
/* Chat Overlay */

.chat-overlay {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    overflow-y: auto;
    background: #050200eb;
}

.chat-overlay.active {
    display: flex;
}

.chat-overlay[hidden],
.chat-setup[hidden],
.chat-applet[hidden],
.chat-age-error[hidden] {
    display: none !important;
}


/* Chat Setup */

.chat-setup {
    width: 100%;
    max-width: 600px;
    margin: auto;
    padding: 42px;
    border-radius: 30px;
    background: #ffffff;
    border: 1px solid #f3d9cf;
    box-shadow: 0 15px 55px #2e2b4614;
    font-family: "Poppins", sans-serif;
}

.chat-setup-logo {
    text-align: center;
    font-size: 42px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.03em;
    color: #ef4b36;
    margin-bottom: 36px;
}


/* Choice Groups */

.chat-choice-group {
    border: 0;
    padding: 0;
    margin: 0 0 30px;
    min-width: 0;
}

.chat-choice-group legend {
    display: block;
    width: 100%;
    padding: 0;
    margin-bottom: 16px;
    color: #24314a;
    font-size: 21px;
    font-weight: 700;
    line-height: 1.4;
}

.chat-options {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.chat-option {
    position: relative;
    display: block;
    cursor: pointer;
    min-width: 0;
}

.chat-option input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

.chat-option span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 62px;
    padding: 12px 10px;
    border: 1px solid #dfe3e9;
    border-radius: 15px;
    background: #ffffff;
    color: #344054;
    text-align: center;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.4;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.chat-option:hover span {
    border-color: #ef3340;
}

.chat-option input:checked + span {
    background: #fff1ef;
    border-color: #ef3340;
    color: #9a143d;
    font-weight: 600;
}

.chat-option input:focus-visible + span {
    outline: 3px solid #ff7a1a;
    outline-offset: 3px;
}


/* Preference Note */

.chat-preference-note {
    color: #667085;
    font-size: 12px;
    line-height: 1.5;
    margin: -12px 0 24px;
}


/* Age Confirmation */

.chat-age-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 24px;
    cursor: pointer;
}

.chat-age-row input {
    width: 20px;
    height: 20px;
    min-width: 20px;
    margin-top: 3px;
    accent-color: #ef3340;
    cursor: pointer;
}

.chat-age-row span {
    color: #344054;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.6;
}

.chat-age-error {
    color: #d92d20;
    font-size: 13px;
    margin: -12px 0 16px;
}


/* Continue Button */

.chat-continue {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 66px;
    padding: 15px 20px;
    border: none;
    border-radius: 17px;
    background: linear-gradient(90deg, #ef3340 0%, #ff7a1a 100%);
    box-shadow: 0 10px 25px #ef334026;
    color: #ffffff;
    font-family: "Poppins", sans-serif;
    font-size: 19px;
    font-weight: 700;
    line-height: 1.3;
    text-align: center;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.chat-continue:hover {
    opacity: 0.92;
}

.chat-continue:focus-visible,
.chat-close:focus-visible {
    outline: 3px solid #ff7a1a;
    outline-offset: 3px;
}


/* Close Button */

.chat-overlay > .chat-close {
    position: fixed;
    top: 18px;
    right: 18px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: #ffffff;
    color: #24314a;
    box-shadow: 0 5px 20px #00000014;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    z-index: 10001;
}


/* Video Chat Applet */

.chat-applet {
    width: 100%;
    height: 100vh;
    height: 100dvh;
}

.chat-applet iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    background: #000000;
}

.chat-overlay:has(.chat-applet:not([hidden])) {
    padding: 0;
    background: #000000;
}


/* Mobile */

@media (max-width: 768px) {

    .chat-overlay {
        padding: 20px 14px;
    }

    .chat-setup {
        max-width: 440px;
        border-radius: 24px;
    }

    .chat-setup-logo {
        font-size: 34px;
        margin-bottom: 26px;
    }

    .chat-choice-group {
        margin-bottom: 24px;
    }

    .chat-choice-group legend {
        font-size: 19px;
        margin-bottom: 12px;
    }

    .chat-options {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .chat-option span {
        min-height: 50px;
        padding: 10px 14px;
        font-size: 15px;
        border-radius: 13px;
    }

    .chat-preference-note {
        font-size: 11px;
        margin: -8px 0 20px;
    }

    .chat-age-row {
        gap: 10px;
        margin-bottom: 20px;
    }

    .chat-age-row span {
        font-size: 13px;
    }

    .chat-continue {
        min-height: 58px;
        padding: 12px 14px;
        font-size: 16px;
        border-radius: 14px;
    }

    .chat-overlay > .chat-close {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
        font-size: 28px;
    }

}

@media screen and (max-width: 768px) {

    .chat-overlay {
        padding: 0 !important;
        background: #ffffff !important;
        overflow-x: hidden;
        overflow-y: auto;
        align-items: flex-start;
    }

    .chat-setup {
        width: 100%;
        max-width: none;
        min-height: 100vh;
        min-height: 100dvh;
        margin: 0;
        border: none;
        border-radius: 0;
        box-shadow: none;
        background: #ffffff;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .chat-setup-logo {
        font-size: 34px;
        margin-bottom: 30px;
    }

    .chat-options {
        grid-template-columns: 1fr !important;
    }

    .chat-overlay > .chat-close {
        position: fixed;
        top: 15px;
        right: 15px;
        z-index: 10001;
    }

}