/* ================================================================
   PAT FAQ — Frontend Modal Styles
   Prefix: pat-faq-  |  Primary: #24478f  |  Radius: 5px
   ================================================================ */

:root {
    --pat-faq-primary: #24478f;
    --pat-faq-gold: #d4af35;
    --pat-faq-z-overlay: 10000;
    --pat-faq-z-modal: 10001;
}

/* ── Overlay ── */

.pat-faq-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: var(--pat-faq-z-overlay);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}
.pat-faq-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

/* ── Modal Container ── */

.pat-faq-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95) translateY(8px);
    width: 95%;
    max-width: 1040px;
    height: 85vh;
    max-height: 780px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    z-index: var(--pat-faq-z-modal);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
}
.pat-faq-overlay.is-open .pat-faq-modal {
    transform: translate(-50%, -50%) scale(1) translateY(0);
    opacity: 1;
}

/* ── Header ── */

.pat-faq-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
}
.pat-faq-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}
.pat-faq-header-icon {
    width: 32px;
    height: 32px;
    border-radius: 5px;
    background: var(--pat-faq-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.pat-faq-header-text h2 {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
    line-height: 1.3;
}
.pat-faq-header-text p {
    font-size: 12px;
    color: #94a3b8;
    margin: 2px 0 0;
}
.pat-faq-close {
    width: 32px;
    height: 32px;
    border: 1px solid transparent;
    background: transparent;
    border-radius: 5px;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    flex-shrink: 0;
}
.pat-faq-close:hover {
    background: #f1f5f9;
    color: #1e293b;
}

/* ── Search + Filters (sticky) ── */

.pat-faq-toolbar {
    padding: 16px 24px 12px;
    border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
    background: #fff;
}
.pat-faq-search-wrap {
    position: relative;
    margin-bottom: 12px;
}
.pat-faq-search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
}
.pat-faq-search {
    width: 100%;
    padding: 8px 36px 8px 34px;
    border: 1px solid #d1d5db;
    border-radius: 5px;
    font-size: 13px;
    transition: border-color 0.15s, box-shadow 0.15s;
    outline: none;
    box-sizing: border-box;
}
.pat-faq-search:focus {
    border-color: var(--pat-faq-primary);
    box-shadow: 0 0 0 3px rgba(36, 71, 143, 0.1);
}
.pat-faq-search-clear {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border: none;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
    padding: 0;
}
.pat-faq-search-clear.is-visible {
    display: flex;
}
.pat-faq-search-clear:hover {
    color: #dc2626;
}

/* Category pills */

.pat-faq-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    overflow-x: visible;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 2px;
}
.pat-faq-pills::-webkit-scrollbar {
    display: none;
}
.pat-faq-pill {
    padding: 5px 12px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 500;
    color: #64748b;
    background: #f1f5f9;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s ease;
    flex-shrink: 0;
}
.pat-faq-pill:hover {
    background: #e2e8f0;
    color: #374151;
}
.pat-faq-pill.is-active {
    background: #fff;
    color: #1e293b;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
    border: 1px solid #e2e8f0;
}
.pat-faq-pill-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 16px;
    padding: 0 4px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 600;
    background: rgba(36, 71, 143, 0.1);
    color: var(--pat-faq-primary);
    margin-left: 4px;
}
.pat-faq-pill.is-active .pat-faq-pill-count {
    background: var(--pat-faq-primary);
    color: #fff;
}

/* Sub-pills (second row when a parent category is active) */

.pat-faq-subpills {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 6px;
    overflow-x: visible;
    scrollbar-width: none;
    padding-bottom: 2px;
}
.pat-faq-subpills[hidden] {
    display: none;
}
.pat-faq-subpills::-webkit-scrollbar {
    display: none;
}
.pat-faq-subpill {
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    color: #64748b;
    background: transparent;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s ease;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.pat-faq-subpill:hover {
    background: #f1f5f9;
    color: #1e293b;
}
.pat-faq-subpill.is-active {
    background: var(--pat-faq-primary);
    color: #fff;
    border-color: var(--pat-faq-primary);
}
.pat-faq-subpill .pat-faq-pill-count {
    background: rgba(100, 116, 139, 0.1);
    color: #64748b;
}
.pat-faq-subpill.is-active .pat-faq-pill-count {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
}

/* Result count */

.pat-faq-result-count {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 8px;
}

/* ── Scrollable body ── */

.pat-faq-body {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

/* Category group headers */

.pat-faq-category-header {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    padding: 16px 24px 6px;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 1;
}

/* ── Accordion Items ── */

.pat-faq-item {
    border-bottom: 1px solid #f1f5f9;
}
.pat-faq-item:last-child {
    border-bottom: none;
}
.pat-faq-item-question {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 24px;
    cursor: pointer;
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
    font-size: 14px;
    font-weight: 500;
    color: #1e293b;
    transition: background 0.15s ease;
    line-height: 1.4;
}
.pat-faq-item-question:hover {
    background: #f8fafc;
}
.pat-faq-item-question-text {
    flex: 1;
    min-width: 0;
}
.pat-faq-item-chevron {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    color: #94a3b8;
    transition: transform 0.2s ease;
}
.pat-faq-item.is-expanded .pat-faq-item-chevron {
    transform: rotate(180deg);
}

/* Answer panel */

.pat-faq-item-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
}
.pat-faq-item.is-expanded .pat-faq-item-answer {
    max-height: 2000px;
}
.pat-faq-item-answer-inner {
    padding: 0 24px 16px 24px;
    margin-left: 0;
    border-left: 3px solid #e2e8f0;
    margin-left: 24px;
    padding-left: 16px;
    font-size: 13px;
    line-height: 1.7;
    color: #374151;
}

/* Answer content typography */

.pat-faq-item-answer-inner h2,
.pat-faq-item-answer-inner h3,
.pat-faq-item-answer-inner h4 {
    margin: 12px 0 6px;
    color: #1e293b;
    line-height: 1.3;
}
.pat-faq-item-answer-inner h2 { font-size: 16px; font-weight: 600; }
.pat-faq-item-answer-inner h3 { font-size: 14px; font-weight: 600; }
.pat-faq-item-answer-inner h4 { font-size: 13px; font-weight: 600; }
.pat-faq-item-answer-inner p {
    margin: 0 0 10px;
}
.pat-faq-item-answer-inner ul,
.pat-faq-item-answer-inner ol {
    margin: 0 0 10px;
    padding-left: 20px;
}
.pat-faq-item-answer-inner li {
    margin-bottom: 4px;
}
.pat-faq-item-answer-inner a {
    color: var(--pat-faq-primary);
    text-decoration: underline;
}
.pat-faq-item-answer-inner img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    margin: 8px 0;
}
.pat-faq-item-answer-inner blockquote {
    margin: 8px 0;
    padding: 8px 16px;
    background: #f8fafc;
    border-left: 3px solid var(--pat-faq-primary);
    border-radius: 0 5px 5px 0;
    color: #374151;
    font-style: italic;
}

/* Category badge in item */

.pat-faq-item-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 500;
    background: #eff6ff;
    color: var(--pat-faq-primary);
    flex-shrink: 0;
}
.pat-faq-item-subbadge {
    display: inline-flex;
    align-items: center;
    padding: 2px 7px;
    border-radius: 5px;
    font-size: 10px;
    font-weight: 500;
    background: #f1f5f9;
    color: #64748b;
    flex-shrink: 0;
    margin-left: 4px;
}

/* Deep-link highlight */

.pat-faq-item.is-highlighted .pat-faq-item-question {
    background: rgba(212, 175, 53, 0.08);
    animation: pat-faq-highlight-fade 1.5s ease forwards;
}
@keyframes pat-faq-highlight-fade {
    0% { background: rgba(212, 175, 53, 0.12); }
    100% { background: transparent; }
}

/* ── Empty state ── */

.pat-faq-empty-state {
    padding: 48px 20px;
    text-align: center;
}
.pat-faq-empty-state svg {
    opacity: 0.3;
    margin-bottom: 12px;
}
.pat-faq-empty-state-text {
    font-size: 14px;
    font-weight: 500;
    color: #64748b;
    margin-bottom: 4px;
}
.pat-faq-empty-state-sub {
    font-size: 12px;
    color: #94a3b8;
}
.pat-faq-empty-state-sub a {
    color: var(--pat-faq-primary);
    cursor: pointer;
    text-decoration: underline;
}

/* ── Responsive: mobile bottom sheet ── */

@media (max-width: 768px) {
    .pat-faq-modal {
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        transform: translateY(100%);
        border-radius: 16px 16px 0 0;
        width: 100%;
        max-width: 100%;
        max-height: 85vh;
        height: auto;
    }
    .pat-faq-overlay.is-open .pat-faq-modal {
        transform: translateY(0);
    }
    .pat-faq-header {
        padding: 12px 16px;
    }
    .pat-faq-toolbar {
        padding: 12px 16px 10px;
    }
    .pat-faq-pills,
    .pat-faq-subpills {
        flex-wrap: nowrap;
        overflow-x: auto;
    }
    .pat-faq-item-question {
        padding: 12px 16px;
    }
    .pat-faq-item-answer-inner {
        margin-left: 16px;
        padding-left: 12px;
    }
    .pat-faq-category-header {
        padding: 12px 16px 6px;
    }
}

@media (max-width: 480px) {
    .pat-faq-header-text h2 {
        font-size: 15px;
    }
    .pat-faq-item-question {
        font-size: 13px;
    }
}

/* ================================================================
   Buttons (shared by [pat_faq_button] + reveal trigger + page CTA)
   ================================================================ */

.pat-faq-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 5px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s ease;
}
.pat-faq-btn-primary {
    background: var(--pat-faq-primary);
    color: #fff;
}
.pat-faq-btn-primary:hover {
    background: #1c3a75;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(36,71,143,0.25);
}
.pat-faq-btn-secondary {
    background: #fff;
    color: #374151;
    border-color: #d1d5db;
}
.pat-faq-btn-secondary:hover {
    background: #f8fafc;
    color: #1e293b;
}
.pat-faq-btn-gold {
    background: var(--pat-faq-gold);
    color: #1a1a2e;
}
.pat-faq-btn-gold:hover {
    background: #c19b22;
    color: #1a1a2e;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(212,175,53,0.3);
}
.pat-faq-btn-link {
    background: transparent;
    color: var(--pat-faq-primary);
    padding: 2px 0;
    font-size: 13px;
    font-weight: 500;
    text-decoration: underline;
    border: none;
    cursor: pointer;
}
.pat-faq-btn-link:hover {
    color: #1c3a75;
}

/* ================================================================
   Inline accordion — [pat_faq]
   ================================================================ */

.pat-faq-inline {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 5px;
    padding: 16px 20px;
    margin: 16px 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.pat-faq-inline-title {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 12px 0;
    line-height: 1.3;
}
.pat-faq-inline-search {
    position: relative;
    margin-bottom: 12px;
}
.pat-faq-inline-search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
    display: flex;
}
.pat-faq-inline-search-input {
    width: 100%;
    height: 36px;
    padding: 6px 12px 6px 32px;
    border: 1px solid #d1d5db;
    border-radius: 5px;
    font-size: 13px;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.pat-faq-inline-search-input:focus {
    border-color: var(--pat-faq-primary);
    box-shadow: 0 0 0 3px rgba(36,71,143,0.1);
}
.pat-faq-inline-body .pat-faq-item {
    border-bottom: 1px solid #f1f5f9;
}
.pat-faq-inline-body .pat-faq-item:last-child {
    border-bottom: none;
}
.pat-faq-inline-body .pat-faq-item-question {
    padding: 12px 8px;
}
.pat-faq-inline-body .pat-faq-item-answer-inner {
    margin-left: 8px;
    padding-left: 16px;
}
.pat-faq-inline-empty {
    padding: 24px 16px;
    text-align: center;
    color: #64748b;
    font-size: 13px;
}
.pat-faq-inline-empty svg {
    opacity: 0.3;
    margin-bottom: 6px;
}

/* ================================================================
   Full FAQ page — [pat_faq_page]
   ================================================================ */

.pat-faq-page {
    --primary: #24478f;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 16px;
    box-sizing: border-box;
}
.pat-faq-page-empty {
    padding: 48px 16px;
    text-align: center;
    color: #64748b;
}

/* Gradient hero header */

.pat-faq-page-header {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.pat-faq-page-header-top {
    padding: 24px 28px 20px;
    background: linear-gradient(230deg, rgba(31,38,74,1) 0%, rgba(11,23,62,1) 17%, rgba(24,41,94,1) 38%, rgba(50,71,120,1) 73%, rgba(6,20,59,1) 100%);
    border-bottom: 3px solid var(--pat-faq-gold);
}
.pat-faq-page-title {
    font-size: 24px;
    font-weight: 600;
    color: #fff;
    margin: 0;
    line-height: 1.2;
}
.pat-faq-page-subtitle {
    font-size: 14px;
    color: rgba(255,255,255,0.75);
    margin: 4px 0 0 0;
}

/* Hero search */

.pat-faq-page-search-row {
    padding: 16px 24px;
    background: #fff;
}
.pat-faq-page-search-wrap {
    position: relative;
    max-width: 640px;
    margin: 0 auto;
}
.pat-faq-page-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
    display: flex;
}
.pat-faq-page-search {
    width: 100%;
    height: 44px;
    padding: 10px 40px 10px 40px;
    border: 1px solid #d1d5db;
    border-radius: 5px;
    font-size: 14px;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.pat-faq-page-search:focus {
    border-color: var(--pat-faq-primary);
    box-shadow: 0 0 0 3px rgba(36,71,143,0.12);
}
.pat-faq-page-search-clear {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    border-radius: 3px;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.pat-faq-page-search-clear.is-visible {
    display: flex;
}
.pat-faq-page-search-clear:hover {
    color: #dc2626;
}

/* Two-column layout */

.pat-faq-page-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 20px;
    margin-bottom: 20px;
}
.pat-faq-page-sidebar {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 5px;
    padding: 12px;
    align-self: start;
    position: sticky;
    top: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.pat-faq-page-sidebar-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    padding: 6px 10px;
    margin-bottom: 4px;
}
.pat-faq-page-cats {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.pat-faq-page-cat {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 12px;
    border: none;
    border-radius: 5px;
    background: transparent;
    color: #374151;
    font-size: 13px;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: all 0.15s ease;
}
.pat-faq-page-cat:hover {
    background: #f1f5f9;
    color: #1e293b;
}
.pat-faq-page-cat.is-active {
    background: rgba(36,71,143,0.08);
    color: var(--pat-faq-primary);
}
.pat-faq-page-cat-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 20px;
    padding: 0 6px;
    background: #f1f5f9;
    color: #64748b;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
}
.pat-faq-page-cat.is-active .pat-faq-page-cat-count {
    background: var(--pat-faq-primary);
    color: #fff;
}

/* Expandable group + nested subcategories */

.pat-faq-page-cat-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.pat-faq-page-cat-chevron {
    margin-left: 4px;
    transition: transform 0.2s ease;
    flex-shrink: 0;
    color: #94a3b8;
}
.pat-faq-page-cat-group.is-open .pat-faq-page-cat-chevron {
    transform: rotate(180deg);
    color: var(--pat-faq-primary);
}
.pat-faq-page-subcats {
    display: none;
    flex-direction: column;
    gap: 2px;
    padding: 4px 0 4px 12px;
    margin-left: 8px;
    border-left: 2px solid #eef2f7;
}
.pat-faq-page-cat-group.is-open .pat-faq-page-subcats {
    display: flex;
}
.pat-faq-page-subcat {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 10px;
    border: none;
    border-radius: 5px;
    background: transparent;
    color: #64748b;
    font-size: 12px;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: all 0.15s ease;
}
.pat-faq-page-subcat:hover {
    background: #f1f5f9;
    color: #1e293b;
}
.pat-faq-page-subcat.is-active {
    background: rgba(36,71,143,0.08);
    color: var(--pat-faq-primary);
    font-weight: 600;
}
.pat-faq-page-subcat .pat-faq-page-cat-count {
    min-width: 18px;
    height: 18px;
    font-size: 10px;
    padding: 0 5px;
}
.pat-faq-page-subcat.is-active .pat-faq-page-cat-count {
    background: var(--pat-faq-primary);
    color: #fff;
}

/* Content */

.pat-faq-page-content {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 5px;
    min-height: 200px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.pat-faq-page-result-count {
    font-size: 12px;
    color: #94a3b8;
    padding: 12px 24px 0;
}
.pat-faq-page-result-count:empty {
    display: none;
}
.pat-faq-page-body .pat-faq-category-header {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    padding: 16px 24px 6px;
    background: #fafbfc;
    border-bottom: 1px solid #f1f5f9;
}
.pat-faq-page-body .pat-faq-item {
    border-bottom: 1px solid #f1f5f9;
}
.pat-faq-page-body .pat-faq-item:last-child {
    border-bottom: none;
}
.pat-faq-page-body .pat-faq-item-question {
    padding: 14px 24px;
    font-size: 14px;
}
.pat-faq-page-body .pat-faq-item-answer-inner {
    margin-left: 24px;
    padding-left: 16px;
}
.pat-faq-page-empty-state {
    padding: 40px 20px;
    text-align: center;
    color: #64748b;
}
.pat-faq-page-empty-state svg {
    opacity: 0.3;
    margin-bottom: 8px;
}
.pat-faq-page-empty-title {
    font-size: 14px;
    font-weight: 500;
    color: #64748b;
    margin-bottom: 4px;
}
.pat-faq-page-empty-sub {
    font-size: 12px;
    color: #94a3b8;
}

/* CTA */

.pat-faq-page-cta {
    background: linear-gradient(135deg, #eff6ff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
    border-radius: 5px;
    padding: 24px;
    margin-bottom: 24px;
}
.pat-faq-page-cta-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.pat-faq-page-cta-title {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
}
.pat-faq-page-cta-text {
    font-size: 13px;
    color: #64748b;
    margin: 4px 0 0 0;
}

/* Responsive */

@media (max-width: 992px) {
    .pat-faq-page-layout {
        grid-template-columns: 1fr;
    }
    .pat-faq-page-sidebar {
        position: static;
        padding: 8px;
    }
    .pat-faq-page-cats {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 6px;
    }
    .pat-faq-page-sidebar-title {
        display: none;
    }
    .pat-faq-page-cat {
        padding: 6px 12px;
    }
    .pat-faq-page-cat-group {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 6px;
        align-items: center;
        flex-basis: 100%;
    }
    .pat-faq-page-cat-group .pat-faq-page-cat {
        width: auto;
    }
    .pat-faq-page-subcats {
        flex-direction: row;
        flex-wrap: wrap;
        margin-left: 0;
        padding: 0 0 0 6px;
        border-left: none;
        border-top: 1px dashed #e2e8f0;
        padding-top: 6px;
        flex-basis: 100%;
        gap: 4px;
    }
    .pat-faq-page-subcat {
        background: #f8fafc;
        padding: 4px 10px;
    }
    .pat-faq-page-cat-chevron {
        display: none;
    }
}

@media (max-width: 768px) {
    .pat-faq-page {
        padding: 0 12px;
    }
    .pat-faq-page-header-top {
        padding: 18px 20px 14px;
    }
    .pat-faq-page-title {
        font-size: 20px;
    }
    .pat-faq-page-body .pat-faq-item-question {
        padding: 12px 16px;
    }
    .pat-faq-page-body .pat-faq-item-answer-inner {
        margin-left: 16px;
        padding-left: 12px;
    }
    .pat-faq-page-body .pat-faq-category-header {
        padding: 12px 16px 6px;
    }
}

/* ================================================================
   Contact-page search panel — [pat_faq_contact_panel]
   ================================================================ */

.pat-faq-contact-panel {
    --primary: #24478f;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-sizing: border-box;
}
.pat-faq-contact-panel-header {
    display: flex;
    align-items: center;
    gap: 12px;
}
.pat-faq-contact-panel-icon {
    width: 36px;
    height: 36px;
    border-radius: 5px;
    background: var(--pat-faq-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.pat-faq-contact-panel-title {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
    line-height: 1.3;
}
.pat-faq-contact-panel-subtitle {
    font-size: 12px;
    color: #94a3b8;
    margin: 2px 0 0 0;
}

/* Search */

.pat-faq-contact-panel-search {
    position: relative;
}
.pat-faq-contact-panel-search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
    display: flex;
}
.pat-faq-contact-panel-search-input {
    width: 100%;
    height: 38px;
    padding: 6px 32px 6px 32px;
    border: 1px solid #d1d5db;
    border-radius: 5px;
    font-size: 13px;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.pat-faq-contact-panel-search-input:focus {
    border-color: var(--pat-faq-primary);
    box-shadow: 0 0 0 3px rgba(36,71,143,0.1);
}
.pat-faq-contact-panel-search-clear {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    padding: 0;
    border: none;
    background: transparent;
    color: #94a3b8;
    border-radius: 3px;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
}
.pat-faq-contact-panel-search-clear.is-visible {
    display: flex;
}

/* Body: scrollable accordion list */

.pat-faq-contact-panel-body {
    max-height: 420px;
    overflow-y: auto;
    border: 1px solid #f1f5f9;
    border-radius: 5px;
}
.pat-faq-contact-panel-body::-webkit-scrollbar {
    width: 6px;
}
.pat-faq-contact-panel-body::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}
.pat-faq-contact-panel-body .pat-faq-item {
    border-bottom: 1px solid #f1f5f9;
}
.pat-faq-contact-panel-body .pat-faq-item:last-child {
    border-bottom: none;
}
.pat-faq-contact-panel-body .pat-faq-item-question {
    padding: 12px 14px;
    font-size: 13px;
}
.pat-faq-contact-panel-body .pat-faq-item-answer-inner {
    margin-left: 14px;
    padding-left: 14px;
    font-size: 13px;
}

.pat-faq-contact-panel-empty {
    padding: 24px 16px;
    text-align: center;
    font-size: 13px;
    color: #64748b;
}
.pat-faq-contact-panel-empty svg {
    opacity: 0.3;
    margin-bottom: 6px;
}
.pat-faq-contact-panel-empty-sub {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 4px;
}

/* CTA */

.pat-faq-contact-panel-cta {
    text-align: center;
    padding: 12px 8px 4px;
    border-top: 1px dashed #e2e8f0;
}
.pat-faq-contact-panel-cta-text {
    font-size: 13px;
    color: #64748b;
    margin: 0 0 10px 0;
}
.pat-faq-contact-panel-cta .pat-faq-btn {
    justify-content: center;
}
.pat-faq-contact-panel-cta[hidden] {
    display: none !important;
}
.pat-faq-contact-panel-cta.is-gated-revealed {
    animation: pat-faq-cta-fade-in 0.45s ease both;
}
@keyframes pat-faq-cta-fade-in {
    0%   { opacity: 0; transform: translateY(6px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* Reveal-back link (prepended to the revealed contact form) */

.pat-faq-reveal-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: #f1f5f9;
    color: #374151;
    border: 1px solid #e2e8f0;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    margin-bottom: 16px;
    transition: all 0.15s ease;
}
.pat-faq-reveal-back:hover {
    background: #e2e8f0;
    color: #1e293b;
}

/* Mobile contact panel */

@media (max-width: 768px) {
    .pat-faq-contact-panel {
        padding: 16px;
    }
    .pat-faq-contact-panel-body {
        max-height: 340px;
    }
}

/* ================================================================
   Armor overrides — defeat builder/theme resets (Bricks, Divi, etc.)
   via specificity + !important. Scoped to our own elements, so safe.
   ================================================================ */

/* Search field: icons must stay absolutely positioned inside input */
.pat-faq-contact-panel .pat-faq-contact-panel-search {
    position: relative !important;
}
.pat-faq-contact-panel .pat-faq-contact-panel-search-icon {
    position: absolute !important;
    left: 10px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    display: flex !important;
    pointer-events: none !important;
    color: #94a3b8 !important;
}
.pat-faq-contact-panel .pat-faq-contact-panel-search-clear {
    position: absolute !important;
    right: 8px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    display: none !important;
    align-items: center !important;
    justify-content: center !important;
    width: 22px !important;
    height: 22px !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    color: #94a3b8 !important;
    cursor: pointer !important;
}
.pat-faq-contact-panel .pat-faq-contact-panel-search-clear.is-visible {
    display: flex !important;
}
.pat-faq-contact-panel .pat-faq-contact-panel-search-input {
    padding: 6px 32px 6px 32px !important;
    height: 38px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    border: 1px solid #d1d5db !important;
    border-radius: 5px !important;
    background: #fff !important;
    font-size: 13px !important;
    line-height: 1.4 !important;
    color: #1e293b !important;
    outline: none !important;
}

/* Primary button: force our palette inside contact panel + full page CTA,
   where host theme buttons tend to aggressively reset background/border. */
.pat-faq-contact-panel .pat-faq-btn,
.pat-faq-page .pat-faq-btn,
button.pat-faq-btn-primary {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    padding: 8px 16px !important;
    border-radius: 5px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    line-height: 1.4 !important;
    border: 1px solid transparent !important;
    cursor: pointer !important;
    text-decoration: none !important;
    font-family: inherit !important;
    text-transform: none !important;
    letter-spacing: normal !important;
}
.pat-faq-contact-panel .pat-faq-btn-primary,
.pat-faq-page .pat-faq-btn-primary,
button.pat-faq-btn-primary {
    background: var(--pat-faq-primary) !important;
    color: #fff !important;
}
.pat-faq-contact-panel .pat-faq-btn-primary:hover,
.pat-faq-page .pat-faq-btn-primary:hover,
button.pat-faq-btn-primary:hover {
    background: #1c3a75 !important;
    color: #fff !important;
}

/* Reveal-target hiding: hard hide via attribute so builder form scripts
   (e.g. Bricksforge `form-loading`) can't override. JS sets the attribute
   on bootstrap and removes it when the user reveals the form. */
[data-pat-faq-hidden-init="1"] {
    display: none !important;
}
