.contact-popup-overlay {
    position: fixed;
    inset: 0;
    z-index: 11000;
    background: rgba(0, 0, 0, .7);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s ease, visibility .3s ease;
}

.contact-popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

.contact-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    z-index: 11001;
    width: 520px;
    max-width: calc(100vw - 40px);
    max-height: calc(100vh - 40px);
    border-radius: 24px;
    background: linear-gradient(160deg, #1a1f2e 0%, #0d1117 100%);
    box-shadow: 0 25px 80px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 255, 255, .08);
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, -50%) scale(.95);
    transition: opacity .3s ease, visibility .3s ease, transform .3s ease;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.contact-popup.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

body.contact-popup-open {
    overflow: hidden;
}

.contact-popup-close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 10;
    display: flex;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: rgba(255, 255, 255, .65);
    background: rgba(255, 255, 255, .1);
    font: inherit;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    transition: background .2s, color .2s;
    align-items: center;
    justify-content: center;
}

.contact-popup-close:hover {
    color: #fff;
    background: rgba(255, 255, 255, .2);
}

.contact-popup-close:focus-visible,
.contact-popup-tab:focus-visible,
.contact-popup-wa-btn:focus-visible,
.contact-popup-submit-btn:focus-visible {
    outline: 3px solid #8bf0b2;
    outline-offset: 3px;
}

.contact-popup-tabs {
    display: flex;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
}

.contact-popup-tab {
    position: relative;
    display: flex;
    padding: 28px 20px 20px;
    border: 0;
    color: rgba(255, 255, 255, .5);
    background: none;
    font: inherit;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    transition: color .2s, background .2s;
    flex: 1;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.contact-popup-tab .fa-whatsapp {
    display: inline-block;
    font-family: "Font Awesome 6 Brands" !important;
    font-size: 28px;
    font-style: normal !important;
    font-weight: 400 !important;
    text-rendering: auto !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
}

.contact-popup-tab .fa-phone {
    display: inline-block;
    font-family: "Font Awesome 6 Free" !important;
    font-size: 28px;
    font-style: normal !important;
    font-weight: 900 !important;
    text-rendering: auto !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
}

.contact-popup-tab::after {
    position: absolute;
    right: 20%;
    bottom: 0;
    left: 20%;
    height: 3px;
    border-radius: 3px 3px 0 0;
    background: #25d366;
    content: "";
    opacity: 0;
    transition: opacity .2s;
}

.contact-popup-tab[aria-selected="true"] {
    color: #25d366;
}

.contact-popup-tab[aria-selected="true"]::after {
    opacity: 1;
}

.contact-popup-tab:hover {
    color: rgba(255, 255, 255, .85);
    background: rgba(255, 255, 255, .03);
}

.contact-popup-body {
    padding: 35px 40px 30px;
}

.contact-popup-panel[hidden] {
    display: none;
}

.contact-popup-panel h3 {
    margin: 0 0 12px;
    color: #fff;
    font-size: 30px;
    font-weight: 700;
    line-height: 1.3;
    text-align: center;
}

.contact-popup-panel p {
    margin: 0 0 30px;
    color: rgba(255, 255, 255, .6);
    font-size: 18px;
    line-height: 1.6;
    text-align: center;
}

.contact-popup-wa-btn {
    display: flex;
    width: 100%;
    padding: 18px 28px;
    border: 0;
    border-radius: 50px;
    color: #fff;
    background: #25d366;
    font-size: 20px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: background .2s, transform .2s;
    align-items: center;
    justify-content: center;
    gap: 14px;
}

.contact-popup-wa-btn:hover {
    color: #fff;
    background: #20ba5a;
    text-decoration: none;
    transform: scale(1.02);
}

.contact-popup-wa-btn .fa-whatsapp {
    display: inline-block;
    font-family: "Font Awesome 6 Brands" !important;
    font-size: 26px;
    font-style: normal !important;
    font-weight: 400 !important;
    text-rendering: auto !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
}

.contact-popup-phone-form {
    display: flex;
    margin-bottom: 18px;
    gap: 10px;
}

.contact-popup-phone-wrapper {
    position: relative;
    flex: 1;
}

.contact-popup-phone-input {
    width: 100%;
    padding: 16px 20px 16px 52px;
    border: 2px solid rgba(255, 255, 255, .15);
    border-radius: 50px;
    color: #fff;
    background: rgba(255, 255, 255, .08);
    font: inherit;
    font-size: 18px;
    font-weight: 500;
    outline: none;
    transition: border-color .2s, background .2s;
    box-sizing: border-box;
}

.contact-popup-phone-input::placeholder {
    color: rgba(255, 255, 255, .4);
}

.contact-popup-phone-input:focus {
    border-color: #25d366;
    background: rgba(37, 211, 102, .05);
}

.contact-popup-phone-wrapper .fa-phone {
    position: absolute;
    top: 50%;
    left: 20px;
    display: inline-block;
    color: rgba(255, 255, 255, .4);
    font-family: "Font Awesome 6 Free" !important;
    font-size: 18px;
    font-style: normal !important;
    font-weight: 900 !important;
    text-rendering: auto !important;
    transform: translateY(-50%);
    pointer-events: none;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
}

.contact-popup-submit-btn {
    padding: 16px 30px;
    border: 0;
    border-radius: 50px;
    color: #fff;
    background: #25d366;
    font: inherit;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
    white-space: nowrap;
    cursor: pointer;
    transition: background .2s, transform .2s;
}

.contact-popup-submit-btn:hover {
    background: #20ba5a;
    transform: scale(1.02);
}

.contact-popup-submit-btn:disabled {
    background: rgba(37, 211, 102, .5);
    cursor: not-allowed;
    transform: none;
}

.contact-popup-honeypot {
    position: absolute !important;
    left: -10000px !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
    overflow: hidden !important;
}

.contact-popup-legal {
    margin-top: 18px;
    color: rgba(255, 255, 255, .4);
    font-size: 12px;
    line-height: 1.6;
    text-align: center;
}

.contact-popup-legal a {
    color: #25d366;
    text-decoration: underline;
}

.contact-popup-message {
    display: none;
    margin-bottom: 18px;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
}

.contact-popup-message.success {
    display: block;
    color: #25d366;
    border: 1px solid rgba(37, 211, 102, .3);
    background: rgba(37, 211, 102, .15);
}

.contact-popup-message.error {
    display: block;
    color: #ff7676;
    border: 1px solid rgba(255, 82, 82, .3);
    background: rgba(255, 82, 82, .15);
}

@media (max-width: 540px) {
    .contact-popup {
        max-width: calc(100vw - 24px);
        max-height: calc(100vh - 24px);
        border-radius: 18px;
    }

    .contact-popup-body {
        padding: 25px 24px 22px;
    }

    .contact-popup-phone-form {
        flex-direction: column;
    }

    .contact-popup-phone-wrapper {
        width: 100%;
        flex: none;
    }

    .contact-popup-submit-btn {
        width: 100%;
        padding: 18px 28px;
        font-size: 17px;
        box-sizing: border-box;
    }

    .contact-popup-panel h3 {
        font-size: 24px;
    }

    .contact-popup-panel p {
        font-size: 15px;
    }

    .contact-popup-tab {
        padding: 22px 15px 16px;
        font-size: 14px;
    }

    .contact-popup-tab .fa-whatsapp,
    .contact-popup-tab .fa-phone {
        font-size: 24px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .contact-popup-overlay,
    .contact-popup,
    .contact-popup-tab,
    .contact-popup-wa-btn,
    .contact-popup-submit-btn {
        transition: none;
    }
}
