.landing-support-nav-trigger {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 11px;
    color: var(--landing-muted-foreground);
    background: transparent;
    border: 0;
    border-radius: 8px;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: color 150ms ease, background-color 150ms ease;
}

.landing-support-nav-trigger:hover,
.landing-support-nav-trigger:focus-visible {
    color: var(--landing-foreground);
    background: var(--landing-muted);
}

.landing-support-unread-dot {
    position: absolute;
    top: 5px;
    right: 3px;
    width: 8px;
    height: 8px;
    background: var(--landing-primary);
    border: 2px solid var(--landing-background);
    border-radius: 50%;
    box-sizing: content-box;
    animation: landing-support-unread-pulse 1.5s ease-in-out infinite;
}

.landing-support-unread-dot[hidden] {
    display: none !important;
}

.landing-support-nav-trigger:focus-visible,
.landing-support-chat button:focus-visible,
.landing-support-chat input:focus-visible,
.landing-support-chat textarea:focus-visible,
.landing-support-chat a:focus-visible {
    outline: 2px solid var(--landing-primary);
    outline-offset: 2px;
}

.landing-support-chat[hidden] {
    display: none !important;
}

.landing-support-chat {
    position: fixed;
    inset: 0;
    z-index: 1200;
    pointer-events: none;
}

.landing-support-chat-backdrop {
    position: absolute;
    inset: 0;
    display: none;
    background: rgba(9, 9, 11, 0.56);
    border: 0;
    pointer-events: auto;
}

.landing-support-chat-dialog {
    position: absolute;
    right: clamp(16px, 2vw, 32px);
    bottom: clamp(16px, 2vw, 30px);
    display: flex;
    width: min(400px, calc(100vw - 32px));
    height: min(650px, calc(100vh - 110px));
    min-height: 460px;
    overflow: hidden;
    flex-direction: column;
    color: var(--landing-card-foreground);
    background: var(--landing-card);
    border: 1px solid var(--landing-border-strong);
    border-radius: 18px;
    box-shadow: 0 24px 80px rgba(9, 9, 11, 0.24), 0 4px 18px rgba(9, 9, 11, 0.12);
    pointer-events: auto;
    transform-origin: right bottom;
    animation: landing-support-chat-in 180ms ease-out both;
}

:root[data-landing-theme="dark"] .landing-support-chat-dialog {
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.48);
}

.landing-support-chat-header {
    display: flex;
    min-height: 72px;
    align-items: center;
    gap: 11px;
    padding: 13px 14px;
    color: var(--landing-card-foreground);
    background: color-mix(in srgb, var(--landing-primary) 7%, var(--landing-card));
    border-bottom: 1px solid var(--landing-border);
}

.landing-support-chat-brand {
    position: relative;
    display: grid;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    place-items: center;
    color: var(--landing-primary);
    background: color-mix(in srgb, var(--landing-primary) 12%, var(--landing-card));
    border: 1px solid color-mix(in srgb, var(--landing-primary) 28%, var(--landing-border));
    border-radius: 12px;
    font-size: 1.25rem;
}

.landing-support-chat-presence {
    position: absolute;
    right: -2px;
    bottom: -2px;
    width: 11px;
    height: 11px;
    background: var(--landing-positive);
    border: 2px solid var(--landing-card);
    border-radius: 50%;
}

.landing-support-chat-heading {
    display: grid;
    min-width: 0;
    gap: 1px;
}

.landing-support-chat-heading strong {
    overflow: hidden;
    font-size: 0.98rem;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.landing-support-chat-heading small {
    color: var(--landing-muted-foreground);
    font-size: 0.75rem;
}

.landing-support-chat-close {
    display: grid;
    width: 36px;
    height: 36px;
    margin-left: auto;
    place-items: center;
    color: var(--landing-muted-foreground);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 9px;
    cursor: pointer;
}

.landing-support-chat-close:hover {
    color: var(--landing-foreground);
    background: var(--landing-muted);
    border-color: var(--landing-border);
}

.landing-support-chat-content,
.landing-support-chat-conversation {
    display: flex;
    min-height: 0;
    flex: 1 1 auto;
    flex-direction: column;
}

.landing-support-chat-loading {
    display: grid;
    flex: 1 1 auto;
    place-content: center;
    justify-items: center;
    gap: 10px;
    color: var(--landing-muted-foreground);
    font-size: 0.82rem;
}

.landing-support-chat-loading[hidden],
.landing-support-chat-identity[hidden],
.landing-support-chat-conversation[hidden],
.landing-support-chat-notice[hidden] {
    display: none !important;
}

.landing-support-chat-spinner {
    width: 23px;
    height: 23px;
    border: 2px solid var(--landing-border-strong);
    border-top-color: var(--landing-primary);
    border-radius: 50%;
    animation: landing-support-spin 650ms linear infinite;
}

.landing-support-chat-identity {
    display: flex;
    flex: 1 1 auto;
    justify-content: center;
    flex-direction: column;
    gap: 13px;
    padding: 26px 24px;
}

.landing-support-chat-welcome-icon {
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    color: var(--landing-primary);
    background: var(--landing-primary-subtle);
    border: 1px solid color-mix(in srgb, var(--landing-primary) 24%, var(--landing-border));
    border-radius: 13px;
    font-size: 1.35rem;
}

.landing-support-chat-identity h2 {
    margin: 4px 0 -5px;
    color: var(--landing-foreground);
    font-size: 1.16rem;
    line-height: 1.35;
}

.landing-support-chat-identity p,
.landing-support-chat-identity > small {
    margin: 0;
    color: var(--landing-muted-foreground);
    font-size: 0.78rem;
    line-height: 1.55;
}

.landing-support-chat-identity label {
    display: grid;
    gap: 6px;
    color: var(--landing-foreground);
    font-size: 0.79rem;
    font-weight: 650;
}

.landing-support-chat-identity input,
.landing-support-chat-composer textarea {
    width: 100%;
    color: var(--landing-foreground);
    background: var(--landing-background);
    border: 1px solid var(--landing-border-strong);
    border-radius: 10px;
    box-shadow: none;
}

.landing-support-chat-identity input {
    min-height: 42px;
    padding: 9px 11px;
    font-size: 0.87rem;
}

.landing-support-chat-identity input::placeholder,
.landing-support-chat-composer textarea::placeholder {
    color: var(--landing-muted-foreground);
    opacity: 0.85;
}

.landing-support-chat-identity input:focus,
.landing-support-chat-composer textarea:focus {
    border-color: var(--landing-primary);
    box-shadow: 0 0 0 3px var(--landing-ring);
    outline: 0;
}

.landing-support-chat-identity button {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    color: var(--landing-primary-foreground);
    background: var(--landing-primary);
    border: 1px solid var(--landing-primary);
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
}

.landing-support-chat-identity button:hover {
    background: var(--landing-primary-hover);
    border-color: var(--landing-primary-hover);
}

.landing-support-chat-messages {
    min-height: 0;
    flex: 1 1 auto;
    padding: 16px 14px;
    overflow-y: auto;
    background: color-mix(in srgb, var(--landing-muted) 76%, var(--landing-background));
    scrollbar-color: color-mix(in srgb, var(--landing-muted-foreground) 46%, transparent) transparent;
    scrollbar-width: thin;
}

.landing-support-chat-intro {
    display: grid;
    justify-items: center;
    gap: 6px;
    max-width: 300px;
    margin: 18px auto 24px;
    padding: 16px;
    color: var(--landing-muted-foreground);
    background: color-mix(in srgb, var(--landing-card) 90%, transparent);
    border: 1px solid var(--landing-border);
    border-radius: 13px;
    text-align: center;
}

.landing-support-chat-intro > span {
    color: var(--landing-positive);
    font-size: 1.2rem;
}

.landing-support-chat-intro strong {
    color: var(--landing-foreground);
    font-size: 0.88rem;
}

.landing-support-chat-intro p {
    margin: 0;
    font-size: 0.75rem;
    line-height: 1.55;
}

.landing-support-message {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    margin-top: 13px;
}

.landing-support-message.is-own {
    justify-content: flex-end;
}

.landing-support-message-avatar {
    display: grid;
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    overflow: visible;
    place-items: center;
    color: var(--landing-positive-foreground);
    background: var(--landing-positive-subtle);
    border: 1px solid color-mix(in srgb, var(--landing-positive) 28%, var(--landing-border));
    border-radius: 50%;
    font-size: 0.9rem;
}

.landing-support-message-avatar.has-image {
    position: relative;
    background: var(--landing-card);
}

.landing-support-message-avatar > img:not(.landing-support-message-frame) {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
}

.landing-support-message-frame {
    position: absolute;
    inset: -7%;
    z-index: 2;
    width: 114%;
    max-width: none !important;
    height: 114%;
    object-fit: contain;
    pointer-events: none;
}

.landing-support-message.is-own .landing-support-message-avatar {
    display: none;
}

.landing-support-message-bubble {
    max-width: 78%;
    padding: 9px 11px;
    color: var(--landing-card-foreground);
    background: var(--landing-card);
    border: 1px solid var(--landing-border);
    border-radius: 13px 13px 13px 4px;
    font-size: 0.82rem;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.landing-support-message.is-own .landing-support-message-bubble {
    color: var(--landing-primary-foreground);
    background: var(--landing-primary);
    border-color: color-mix(in srgb, var(--landing-primary) 72%, var(--landing-border));
    border-radius: 13px 13px 4px 13px;
}

.landing-support-message-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 4px;
    color: var(--landing-muted-foreground);
    font-size: 0.65rem;
    line-height: 1.35;
}

.landing-support-message-meta strong {
    color: var(--landing-foreground);
}

.landing-support-message.is-own .landing-support-message-meta,
.landing-support-message.is-own .landing-support-message-meta strong {
    color: color-mix(in srgb, var(--landing-primary-foreground) 84%, transparent);
}

.landing-support-chat-notice {
    padding: 8px 13px;
    color: var(--landing-primary);
    background: var(--landing-primary-subtle);
    border-top: 1px solid color-mix(in srgb, var(--landing-primary) 24%, var(--landing-border));
    font-size: 0.74rem;
    text-align: center;
}

.landing-support-chat-composer {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding: 11px 12px;
    background: var(--landing-card);
    border-top: 1px solid var(--landing-border);
}

.landing-support-chat-composer textarea {
    min-height: 42px;
    max-height: 116px;
    padding: 10px 11px;
    resize: none;
    font-size: 0.84rem;
    line-height: 1.45;
}

.landing-support-chat-composer button {
    display: grid;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    place-items: center;
    color: var(--landing-primary-foreground);
    background: var(--landing-primary);
    border: 1px solid var(--landing-primary);
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
}

.landing-support-chat-composer button:hover {
    background: var(--landing-primary-hover);
    border-color: var(--landing-primary-hover);
}

.landing-support-chat-composer button:disabled,
.landing-support-chat-identity button:disabled {
    opacity: 0.62;
    cursor: wait;
}

.landing-support-chat-footer {
    display: flex;
    min-height: 34px;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 7px 13px 9px;
    color: var(--landing-muted-foreground);
    background: var(--landing-card);
    font-size: 0.67rem;
}

.landing-support-chat-footer span,
.landing-support-chat-footer a {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.landing-support-chat-footer i {
    color: var(--landing-positive);
}

.landing-support-chat-footer a {
    color: var(--landing-primary);
    font-weight: 700;
    text-decoration: none;
}

@keyframes landing-support-chat-in {
    from { opacity: 0; transform: translateY(10px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes landing-support-spin {
    to { transform: rotate(360deg); }
}

@keyframes landing-support-unread-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.38; transform: scale(0.76); }
}

@media (max-width: 900px) {
    .landing-nav .landing-support-nav-trigger {
        min-height: 42px;
        justify-content: flex-start;
        padding: 9px 11px;
    }
}

@media (max-width: 640px) {
    body.vynx-landing-page.support-chat-open {
        overflow: hidden;
    }

    .landing-support-chat-backdrop {
        display: block;
    }

    .landing-support-chat-dialog {
        top: max(12px, env(safe-area-inset-top));
        right: 10px;
        bottom: max(10px, env(safe-area-inset-bottom));
        left: 10px;
        width: auto;
        height: auto;
        min-height: 0;
        border-radius: 16px;
        transform-origin: center bottom;
    }

    .landing-support-chat-header {
        min-height: 64px;
        padding: 10px 12px;
    }

    .landing-support-chat-identity {
        justify-content: flex-start;
        padding: 20px 18px;
    }

    .landing-support-chat-messages {
        padding: 13px 11px;
    }
}

@media (max-width: 370px) {
    .landing-support-chat-footer span {
        display: none;
    }

    .landing-support-chat-footer {
        justify-content: flex-end;
    }
}

@media (prefers-reduced-motion: reduce) {
    .landing-support-chat-dialog,
    .landing-support-chat-spinner,
    .landing-support-unread-dot {
        animation: none;
    }
}
