html,
body.support-chat-body {
    height: 100%;
    overflow: hidden;
    background: #000;
}

body.support-chat-body #site-footer {
    display: none;
}

.support-page.page-shell {
    height: 100dvh;
    min-height: 100dvh;
    padding: 108px 16px 16px;
    box-sizing: border-box;
}

.support-shell {
    display: flex;
    flex-direction: column;
    width: min(760px, 100%);
    height: 100%;
    margin: 0 auto;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 22px;
    background: #0b0b0b;
}

.support-header {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 0 0 auto;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.support-header img {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    object-fit: cover;
}

.support-header h1 {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 560;
    letter-spacing: -0.03em;
}

.support-header p {
    display: flex;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, 0.42);
    font-size: 0.7rem;
}

.support-header p span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #7dce96;
}

.support-header a,
.restart-chat {
    margin-left: auto;
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    background: transparent;
    color: rgba(255, 255, 255, 0.62);
    font: 600 0.72rem var(--font-sans);
    text-decoration: none;
    cursor: pointer;
}

.restart-chat[hidden] {
    display: none;
}

.support-header a:hover,
.restart-chat:hover {
    color: #fff;
}

.support-panel {
    display: flex;
    flex: 1 1 auto;
    min-height: 0;
}

.support-step {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    width: 100%;
}

.support-step[hidden] {
    display: none;
}

.gate-step {
    align-items: center;
    justify-content: center;
    padding: 32px 24px;
    text-align: center;
}

.gate-avatar {
    width: 72px;
    height: 72px;
    margin-bottom: 18px;
    border-radius: 20px;
    object-fit: cover;
}

.gate-step h2 {
    margin-bottom: 8px;
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 4vw, 2.4rem);
    font-weight: 560;
    letter-spacing: -0.035em;
}

.gate-step > p {
    max-width: 360px;
    margin-bottom: 22px;
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.9rem;
}

#turnstileWidget {
    min-height: 65px;
}

.verification-error {
    margin-top: 8px;
    color: #ff9c91;
}

.support-honeypot {
    position: absolute !important;
    left: -10000px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

.start-chat-button {
    width: 100%;
    margin-top: 14px;
    padding: 13px 16px;
    border: none;
    border-radius: 999px;
    background: #fff;
    color: #000;
    font: 700 0.88rem var(--font-sans);
    cursor: pointer;
}

.start-chat-button:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.chat-step {
    min-height: 0;
}

.chat-messages {
    flex: 1 1 auto;
    min-height: 0;
    padding: 16px;
    overflow-y: auto;
}

.chat-message {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 14px;
}

.chat-message p {
    max-width: min(520px, 86%);
    padding: 11px 13px;
    border-radius: 16px 16px 16px 6px;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.9rem;
    line-height: 1.5;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.message-avatar {
    width: 28px;
    height: 28px;
    margin-top: 3px;
    border-radius: 8px;
    object-fit: cover;
}

.user-message {
    justify-content: flex-end;
}

.user-message p {
    border-radius: 16px 16px 6px 16px;
    background: #ece6db;
    color: #14120f;
}

.typing-message p {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 52px;
    min-height: 38px;
}

.typing-message i {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.55);
    animation: typingDot 1s ease-in-out infinite;
}

.typing-message i:nth-child(2) { animation-delay: 0.14s; }
.typing-message i:nth-child(3) { animation-delay: 0.28s; }

@keyframes typingDot {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.35; }
    30% { transform: translateY(-4px); opacity: 1; }
}

.escalation-card {
    max-width: min(520px, 86%);
    margin: -4px 0 14px 36px;
    padding: 12px 14px;
    border: 1px solid rgba(209, 173, 98, 0.25);
    border-radius: 14px;
    background: rgba(209, 173, 98, 0.05);
}

.escalation-card strong {
    display: block;
    margin-bottom: 4px;
}

.escalation-card p {
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.48);
    font-size: 0.75rem;
}

.escalation-card a {
    color: #dfbd74;
    font-size: 0.8rem;
    font-weight: 700;
}

.quick-prompts {
    display: flex;
    gap: 7px;
    padding: 0 16px 10px;
    overflow-x: auto;
}

.quick-prompts button {
    flex: 0 0 auto;
    padding: 7px 11px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    background: transparent;
    color: rgba(255, 255, 255, 0.55);
    font: 600 0.72rem var(--font-sans);
    cursor: pointer;
}

.chat-composer {
    position: relative;
    margin: 0 16px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
}

.chat-composer label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

.chat-composer textarea {
    width: 100%;
    min-height: 52px;
    max-height: 120px;
    padding: 15px 54px 14px 14px;
    resize: none;
    border: none;
    outline: none;
    background: transparent;
    color: #fff;
    font: 0.92rem/1.45 var(--font-sans);
}

.chat-composer button {
    position: absolute;
    right: 8px;
    bottom: 8px;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: #fff;
    color: #000;
    font-size: 1rem;
    cursor: pointer;
}

.chat-composer button:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.chat-notice {
    padding: 8px 16px 12px;
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.68rem;
    text-align: center;
}

.chat-notice a {
    color: rgba(255, 255, 255, 0.5);
}

@media (max-width: 700px) {
    .support-page.page-shell {
        padding: 96px 10px 10px;
    }

    .support-shell {
        border-radius: 18px;
    }

    .support-header a {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .typing-message i {
        animation: none;
    }
}
