﻿.faq-template-page {
    margin: clamp(1rem, 3vw, 2rem) clamp(0.8rem, 2.5vw, 2rem) clamp(2rem, 4vw, 3.4rem);
}

.faq-template-header {
    margin-bottom: 1rem;
}

.faq-template-head {
    border: 1px solid rgba(230, 237, 247, 0.14);
    border-radius: 16px;
    padding: clamp(1rem, 2.1vw, 1.4rem);
    background: linear-gradient(140deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
}

.faq-template-kicker {
    display: inline-block;
    font-size: 0.72rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--tdx-cyan);
    margin-bottom: 0.45rem;
}

.faq-template-title {
    margin: 0;
    font-size: clamp(1.4rem, 2.4vw, 1.9rem);
}

.faq-template-subtitle {
    margin: 0.45rem 0 0;
    font-size: 0.98rem;
    color: rgba(230, 237, 247, 0.78);
}

.faq-template-search {
    margin-top: 0.85rem;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.55rem;
    align-items: center;
}

.faq-template-search-input {
    width: 100%;
    min-height: 48px;
    border-radius: 12px;
    border: 1px solid rgba(230, 237, 247, 0.18);
    background: rgba(11, 15, 24, 0.7);
    color: var(--tdx-text);
    padding: 0.75rem 0.95rem;
    font-size: 0.96rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.faq-template-search-input:focus {
    outline: none;
    border-color: rgba(0, 224, 255, 0.78);
    box-shadow: 0 0 0 3px rgba(0, 224, 255, 0.17);
}

.faq-template-search-clear {
    min-height: 48px;
    border: 1px solid rgba(230, 237, 247, 0.22);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.04);
    color: var(--tdx-text);
    font-weight: 600;
    cursor: pointer;
}

.faq-template-search-clear:hover,
.faq-template-search-clear:focus-visible {
    border-color: rgba(0, 224, 255, 0.5);
    box-shadow: 0 0 0 2px rgba(0, 224, 255, 0.12);
}

.faq-template-results {
    margin: 0.6rem 0 0;
    min-height: 1.3rem;
    font-size: 0.86rem;
    color: rgba(230, 237, 247, 0.66);
}

.faq-template-content-wrap {
    min-height: 45vh;
}

.faq-template-content-card {
    border: 1px solid rgba(230, 237, 247, 0.14);
    border-radius: 18px;
    padding: clamp(1rem, 2.3vw, 1.4rem);
    background: rgba(12, 18, 29, 0.92);
}

.faq-entry-content .wp-block-search {
    display: none;
}

.faq-entry-content > .wp-block-details,
.faq-entry-content details {
    margin: 0 0 0.8rem;
    border: 1px solid rgba(230, 237, 247, 0.13);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    overflow: hidden;
}

.faq-entry-content details > summary {
    cursor: pointer;
    list-style: none;
    padding: 0.88rem 0.95rem;
    font-weight: 650;
    color: #eaf2ff;
    position: relative;
    padding-right: 2.1rem;
}

.faq-entry-content details > summary::-webkit-details-marker {
    display: none;
}

.faq-entry-content details > summary::after {
    content: '+';
    position: absolute;
    right: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    font-weight: 600;
    opacity: 0.75;
}

.faq-entry-content details[open] > summary {
    background: rgba(0, 224, 255, 0.08);
    border-bottom: 1px solid rgba(230, 237, 247, 0.12);
}

.faq-entry-content details[open] > summary::after {
    content: '-';
}

.faq-entry-content details > :not(summary) {
    padding: 0.9rem 0.95rem;
}

.faq-entry-content details > :not(summary):last-child {
    padding-bottom: 1rem;
}

.faq-entry-content .wp-block-heading {
    margin-top: 1.2rem;
    margin-bottom: 0.75rem;
}

.faq-entry-content .wp-block-table {
    overflow-x: auto;
}

.faq-search-highlight {
    background: linear-gradient(180deg, rgba(255, 246, 150, 0.2) 0%, #ffe85d 100%);
    color: #1a1a1a;
    border-radius: 0.18rem;
    padding: 0 0.08rem;
}

.faq-template-empty {
    margin: 1rem 0 0;
    padding: 0.8rem 0.95rem;
    border-radius: 10px;
    border: 1px solid rgba(230, 237, 247, 0.2);
    background: rgba(255, 255, 255, 0.03);
    color: rgba(230, 237, 247, 0.8);
}

@media (max-width: 860px) {
    .faq-template-page {
        margin: 0.9rem 0.55rem 2rem;
    }

    .faq-template-search {
        grid-template-columns: 1fr;
    }

    .faq-template-search-clear {
        width: 100%;
    }
}
