/* =========================
   Support Page
   Matches site design system
   ========================= */

/* ---- Hero ---- */
.support-hero {
    padding: 3rem 0 2rem;
    text-align: center;
}

    .support-hero h1 {
        font-size: clamp(1.75rem, 5vw, 2.5rem);
        font-weight: 700;
        margin: 0 0 0.5rem;
        color: var(--text);
    }

.support-hero__subtitle {
    font-size: 1.1rem;
    color: var(--muted);
    margin: 0 auto;
    max-width: 480px;
}

/* ---- Search ---- */
.support-search {
    display: block;
    max-width: 400px;
    margin: 1.5rem auto 0;
}

    .support-search input {
        width: 100%;
        padding: 0.875rem 1.25rem;
        border-radius: 12px;
        border: 1px solid var(--border);
        background: var(--card);
        color: var(--text);
        font-size: 1rem;
        transition: border-color 0.15s, box-shadow 0.15s;
    }

        .support-search input::placeholder {
            color: var(--muted);
        }

        .support-search input:focus {
            outline: none;
            border-color: var(--brand);
            box-shadow: 0 0 0 3px color-mix(in oklab, var(--brand) 20%, transparent);
        }

/* ---- Chips ---- */
.support-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    padding: 0 1rem;
}

.support-chip {
    padding: 0.5rem 1rem;
    border-radius: 999px;
    background: var(--card);
    border: 1px solid var(--border);
    color: var(--text);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: background 0.15s, border-color 0.15s, transform 0.15s;
}

    .support-chip:hover {
        background: var(--bg-hover, rgba(0, 0, 0, 0.04));
        border-color: var(--brand);
        transform: translateY(-1px);
    }

[data-theme="dark"] .support-chip:hover {
    background: rgba(255, 255, 255, 0.08);
}

/* ---- Content ---- */
.support-content {
    padding: 2rem 0 4rem;
}

/* ---- Group ---- */
.support-group {
    margin-bottom: 2.5rem;
}

    .support-group h2 {
        font-size: 1.25rem;
        font-weight: 600;
        margin: 0 0 1rem;
        color: var(--text);
        padding-left: 4px;
    }

.support-group,
.faq-item {
    scroll-margin-top: 88px;
}

/* ---- FAQ list ---- */
.support-faq {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* ---- FAQ item (card style) ---- */
.faq-item {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: box-shadow 0.15s, border-color 0.15s;
}

    .faq-item:hover {
        border-color: color-mix(in oklab, var(--border) 50%, var(--brand) 50%);
    }

    .faq-item[open] {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    }

[data-theme="dark"] .faq-item[open] {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* ---- Summary (question) ---- */
.faq-item summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    cursor: pointer;
    font-weight: 500;
    color: var(--text);
    list-style: none;
    user-select: none;
    transition: background 0.15s;
}

    .faq-item summary::-webkit-details-marker {
        display: none;
    }

    .faq-item summary:hover {
        background: var(--bg-hover, rgba(0, 0, 0, 0.02));
    }

[data-theme="dark"] .faq-item summary:hover {
    background: rgba(255, 255, 255, 0.04);
}

/* Chevron icon */
.faq-item summary::after {
    content: "";
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    background: currentColor;
    opacity: 0.4;
    transition: transform 0.2s, opacity 0.15s;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E") center / contain no-repeat;
}

.faq-item summary:hover::after {
    opacity: 0.6;
}

.faq-item[open] summary::after {
    transform: rotate(180deg);
    opacity: 0.6;
}

/* ---- Answer body ---- */
.faq-body {
    padding: 0 1.25rem 1.25rem;
    color: var(--muted);
    line-height: 1.6;
    font-size: 0.95rem;
}

    .faq-body br {
        content: "";
        display: block;
        margin: 0.35rem 0;
    }

/* ---- Info grid (access levels, reservation rules) ---- */
.faq-grid {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 10px;
    background: var(--bg-secondary, rgba(0, 0, 0, 0.03));
}

[data-theme="dark"] .faq-grid {
    background: rgba(255, 255, 255, 0.04);
}

.faq-grid__row {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 0.75rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}

    .faq-grid__row:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }

    .faq-grid__row strong {
        color: var(--text);
        font-weight: 600;
    }

    .faq-grid__row span {
        color: var(--muted);
    }

.faq-note {
    margin-top: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    background: color-mix(in oklab, var(--brand) 8%, transparent);
    font-size: 0.875rem;
    color: var(--text);
    border-left: 3px solid var(--brand);
}

/* ---- Contact card ---- */
.support-contact {
    margin-top: 3rem;
    padding: 2rem;
    border-radius: 16px;
    background: var(--card);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

    .support-contact h3 {
        font-size: 1.125rem;
        font-weight: 600;
        margin: 0 0 0.5rem;
        color: var(--text);
    }

    .support-contact p {
        margin: 0;
        color: var(--muted);
        font-size: 0.95rem;
    }

    .support-contact .btn {
        flex-shrink: 0;
    }

/* ---- Utility ---- */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ---- Mobile ---- */
@media (max-width: 768px) {
    .support-hero {
        padding: 2rem 0 1.5rem;
    }

        .support-hero h1 {
            font-size: 1.5rem;
        }

    .support-hero__subtitle {
        font-size: 1rem;
        padding: 0 1rem;
    }

    .support-search {
        padding: 0 1rem;
        max-width: none;
    }

    .support-chips {
        gap: 0.375rem;
    }

    .support-chip {
        padding: 0.4rem 0.75rem;
        font-size: 0.8rem;
    }

    .support-content {
        padding: 1.5rem 0 3rem;
    }

    .support-group h2 {
        font-size: 1.125rem;
    }

    .faq-item summary {
        padding: 0.875rem 1rem;
        font-size: 0.95rem;
    }

        .faq-item summary:focus-visible,
        .support-chip:focus-visible,
        .support-contact .btn:focus-visible {
            outline: none;
            box-shadow: 0 0 0 3px color-mix(in oklab, var(--brand) 22%, transparent);
            border-radius: 12px;
        }

    .faq-body {
        padding: 0 1rem 1rem;
        font-size: 0.9rem;
    }

    .faq-grid {
        padding: 0.75rem;
    }

    .faq-grid__row {
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }

    .support-contact {
        flex-direction: column;
        align-items: flex-start;
        padding: 1.5rem;
        text-align: left;
    }

        .support-contact .btn {
            width: 100%;
            text-align: center;
        }
}

/* ---- Animation for opening ---- */
@media (prefers-reduced-motion: no-preference) {
    .faq-item[open] .faq-body {
        animation: faq-slide-in 0.2s ease-out;
    }

    @keyframes faq-slide-in {
        from {
            opacity: 0;
            transform: translateY(-8px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}

/* ---- No results state ---- */
.support-faq:empty::before,
.support-group:has(.faq-item[style*="display: none"]:only-child)::after {
    content: attr(data-empty-text);
    display: block;
    text-align: center;
    padding: 2rem;
    color: var(--muted);
    font-style: italic;
}