/* GARDJ — Kontakt-Popup + schwebender Kontakt-Button.
   Ausgelagert aus functions.php (wp_head <style>), damit der Browser die
   Datei cachen kann und das HTML kleiner bleibt. */

/* ---------- Popup ---------- */
.contact-popup {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition:
        opacity 0.25s ease,
        visibility 0.25s ease;
}

.contact-popup.is-open {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

.contact-popup__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

.contact-popup__window {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 620px;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.3);
    transform: translateY(20px) scale(0.98);
    transition: transform 0.25s ease;
}

.contact-popup.is-open .contact-popup__window {
    transform: translateY(0) scale(1);
}

.contact-popup__content {
    padding: 40px;
}

.contact-popup__close {
    position: absolute;
    top: 12px;
    right: 14px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #111;
    font-size: 30px;
    font-weight: 300;
    line-height: 1;
    cursor: pointer;
    box-shadow: none;
    outline: none;
    transition:
        background-color 0.2s ease,
        transform 0.2s ease;
}

.contact-popup__close:hover {
    background: rgba(0, 0, 0, 0.07);
    transform: rotate(90deg);
}

body.contact-popup-open {
    overflow: hidden;
}

@media (max-width: 767px) {
    .contact-popup {
        align-items: flex-end;
        padding: 12px;
    }

    .contact-popup__window {
        max-height: calc(100vh - 24px);
        border-radius: 16px 16px 10px 10px;
    }

    .contact-popup__content {
        padding: 38px 20px 22px;
    }
}


/* ---------- Schwebender Kontakt-Button ---------- */
.gardj-floating-contact,
.gardj-floating-contact * {
    box-sizing: border-box;
}

.gardj-floating-contact {
    position: fixed;
    left: 24px;
    bottom: 24px;
    z-index: 99990;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 66px;
    padding: 8px 10px 8px 9px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(
        135deg,
        #46684a 0%,
        #314d35 100%
    );
    box-shadow:
        0 16px 38px rgba(24, 45, 29, 0.28),
        inset 0 1px rgba(255, 255, 255, 0.18);
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    overflow: hidden;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    transition:
        transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.3s ease;
}

.gardj-floating-contact:hover {
    color: #fff;
    transform: translateY(-4px);
    box-shadow:
        0 20px 45px rgba(24, 45, 29, 0.34),
        inset 0 1px rgba(255, 255, 255, 0.2);
}

.gardj-floating-contact:focus,
.gardj-floating-contact:focus-visible {
    color: #fff;
    outline: none;
}

.gardj-floating-contact__icon {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    color: #314d35;
    background: #fff;
    box-shadow: 0 5px 15px rgba(25, 44, 29, 0.18);
}

.gardj-floating-contact__text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 130px;
}

.gardj-floating-contact__text span {
    color: rgba(255, 255, 255, 0.72);
    font-size: 10px;
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.gardj-floating-contact__text strong {
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
}

.gardj-floating-contact__arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    transition:
        transform 0.3s ease,
        background-color 0.3s ease;
}

.gardj-floating-contact:hover
.gardj-floating-contact__arrow {
    background: rgba(255, 255, 255, 0.17);
    transform: translateX(3px);
}

@media (max-width: 767px) {
    .gardj-floating-contact {
        right: 15px;
        bottom: 60px;
        width: 56px;
        height: 56px;
        min-height: 56px;
        padding: 0;
        border: 0;
        border-radius: 50%;
        background: #ff6a00;
        overflow: visible;
        animation:
            gardj-mobile-contact-pulse
            1.8s
            ease-out
            infinite;
    }

    .gardj-floating-contact:hover,
    .gardj-floating-contact:active,
    .gardj-floating-contact:focus {
        color: #fff;
        background: #ff6a00;
        transform: none;
    }

    .gardj-floating-contact__icon {
        width: 56px;
        height: 56px;
        color: #fff;
        background: transparent;
        box-shadow: none;
    }

    .gardj-floating-contact__icon svg {
        width: 27px;
        height: 27px;
    }

    .gardj-floating-contact__text,
    .gardj-floating-contact__arrow {
        display: none;
    }
}

@keyframes gardj-mobile-contact-pulse {
    0% {
        box-shadow:
            0 10px 28px rgba(255, 106, 0, 0.38),
            0 0 0 0 rgba(255, 106, 0, 0.5);
    }

    70% {
        box-shadow:
            0 10px 28px rgba(255, 106, 0, 0.38),
            0 0 0 18px rgba(255, 106, 0, 0);
    }

    100% {
        box-shadow:
            0 10px 28px rgba(255, 106, 0, 0.38),
            0 0 0 0 rgba(255, 106, 0, 0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .gardj-floating-contact {
        animation: none !important;
        transition: none !important;
    }
}
