/* ================================================
   COF Search Page — Full-page Airbnb-style search
   ================================================ */

/* Initial page load — hides content until JS initializes */
.cof-search-page.is-initializing > *:not(.cof-search-loader) {
    visibility: hidden;
}

.cof-search-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 0;
    position: absolute;
    left: 0;
    right: 0;
}

.cof-search-page:not(.is-initializing) .cof-search-loader {
    display: none;
}

.cof-search-loader__spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #e5e7eb;
    border-top-color: #00539B;
    border-radius: 50%;
    animation: cof-spin 0.7s linear infinite;
}

@keyframes cof-spin {
    to { transform: rotate(360deg); }
}

.cof-search-page {
    position: relative;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 15px;
    color: #111827;
    max-width: 1399px;
    margin: 0 auto;
    padding: 0 40px;
    box-sizing: border-box;
}

.cof-search-page *,
.cof-search-page *::before,
.cof-search-page *::after {
    box-sizing: border-box;
}

/* ---- Hero Section ---- */

.cof-search-hero {
    text-align: center;
    padding: 48px 0 32px;
}

.cof-search-hero-title {
    font-size: 32px;
    font-weight: 800;
    color: #00539B;
    margin: 0 0 24px;
    letter-spacing: 1px;
}

.cof-search-hero-bar {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

/* Autocomplete Dropdown */
.cof-page-autocomplete {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: -2px;
    background: #fff;
    border: 2px solid #00539B;
    border-top: 1px solid #e5e7eb;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    z-index: 100;
    display: none;
    overflow: hidden;
}

.cof-page-autocomplete.is-open {
    display: block;
}

.cof-page-autocomplete__item {
    padding: 10px 18px;
    font-size: 14px;
    color: #374151;
    cursor: pointer;
    transition: background 0.1s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cof-page-autocomplete__item:hover,
.cof-page-autocomplete__item.is-active {
    background: #f0f7ff;
    color: #00539B;
}

.cof-page-autocomplete__icon {
    flex-shrink: 0;
    color: #9ca3af;
}

.cof-page-autocomplete__item.is-active .cof-page-autocomplete__icon {
    color: #00539B;
}

.cof-page-autocomplete__text {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cof-page-autocomplete__text em {
    font-style: normal;
    font-weight: 700;
    color: #111827;
}

.cof-page-autocomplete__hint {
    font-size: 11px;
    color: #9ca3af;
    flex-shrink: 0;
}

/* Large input group override */
.cof-search-input-group--large {
    display: flex;
    align-items: stretch;
    background: #fff;
    border: 2px solid #d1d5db;
    border-radius: 16px;
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.cof-search-input-group--large:focus-within {
    border-color: #00539B;
    box-shadow: 0 4px 24px rgba(0, 83, 155, 0.15);
}

.cof-search-input-group--large .cof-category-select {
    appearance: none;
    -webkit-appearance: none;
    border: none;
    border-right: 1px solid #e5e7eb;
    background: #f9fafb url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") no-repeat right 12px center;
    padding: 0 34px 0 18px;
    font-size: 15px;
    color: #374151;
    min-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
    width: 140px;
    max-width: 200px;
    outline: none;
    height: initial;
}

.cof-search-input-group--large .cof-search-field-wrap {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.cof-search-input-group--large .cof-search-input {
    width: 100%;
    border: none;
    padding: 16px 40px 16px 18px;
    font-size: 17px;
    color: #111827;
    background: transparent;
    outline: none;
}

.cof-search-input-group--large .cof-search-input::placeholder {
    color: #9ca3af;
}

.cof-search-input-group--large .cof-search-spinner {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border: 2px solid #e5e7eb;
    border-top-color: #00539B;
    border-radius: 50%;
    display: none;
    animation: cof-page-spin 0.6s linear infinite;
}

.cof-search-page.is-loading .cof-search-spinner {
    display: block;
}

@keyframes cof-page-spin {
    to { transform: translateY(-50%) rotate(360deg); }
}

.cof-search-input-group--large .cof-search-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: #00539B;
    color: #fff;
    padding: 0 22px;
    cursor: pointer;
    transition: background 0.15s ease;
    flex-shrink: 0;
}

.cof-search-input-group--large .cof-search-btn:hover {
    background: #003d73;
}

.cof-search-input-group--large .cof-search-btn.is-add-mode {
    animation: cof-btn-breathe 2s ease-in-out infinite;
}

@keyframes cof-btn-breathe {
    0%, 100% { background: #00539B; }
    50% { background: #0077cc; }
}

.cof-search-input-group--large.is-active-search {
    border-color: #00539B;
    animation: cof-bar-glow 4s ease-in-out infinite;
}

.cof-search-input-group--large.is-active-search .cof-search-input::placeholder {
    color: #839B4B !important;
    font-weight: 500 !important;
}

@keyframes cof-bar-glow {
    0%, 100% { box-shadow: 0 0 6px 1px rgba(0, 83, 155, 0.15); }
    25% { box-shadow: 0 0 8px 2px rgba(200, 170, 50, 0.12); }
    50% { box-shadow: 0 0 8px 2px rgba(100, 180, 230, 0.15); }
    75% { box-shadow: 0 0 6px 2px rgba(0, 83, 155, 0.12); }
}

/* ---- Body Section ---- */

.cof-search-body {
    padding-bottom: 60px;
}

/* ---- Layout (sidebar + main) ---- */

.cof-search-layout {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.cof-search-main {
    flex: 1;
    min-width: 0;
}

/* ---- Transparency Sidebar ---- */

.cof-transparency-sidebar {
    width: 0;
    min-width: 0;
    opacity: 0;
    overflow: hidden;
    padding: 0;
    flex-shrink: 0;
    transition: width 0.3s ease, opacity 0.25s ease, padding 0.3s ease, min-width 0.3s ease;
    position: sticky;
    top: 200px;
    align-self: flex-start;
}

.cof-transparency-sidebar.is-visible {
    width: 260px;
    min-width: 260px;
    opacity: 1;
    overflow: visible;
}

.cof-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 2px solid #e5e7eb;
    margin-bottom: 16px;
}

.cof-sidebar-title {
    font-size: 16px;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

.cof-sidebar-close {
    display: none;
    border: none;
    background: none;
    font-size: 22px;
    color: #6b7280;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}

.cof-sidebar-close:hover {
    color: #111827;
}

.cof-sidebar-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.cof-sidebar-group {
    animation: cof-bubble-in 0.2s ease both;
}

.cof-sidebar-group__label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6b7280;
    margin: 0 0 10px;
}

.cof-sidebar-group__options {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cof-sidebar-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s ease;
    font-size: 14px;
    color: #374151;
    user-select: none;
}

.cof-sidebar-option:hover {
    background: #f0f7ff;
}

.cof-sidebar-option input[type="checkbox"],
.cof-sidebar-option input[type="radio"] {
    accent-color: #00539B;
    width: 16px;
    height: 16px;
    margin: 0;
    cursor: pointer;
    flex-shrink: 0;
}

.cof-sidebar-option__label {
    flex: 1;
    line-height: 1.3;
}

.cof-sidebar-option__count {
    font-size: 12px;
    color: #9ca3af;
}

.cof-sidebar-submit {
    display: none;
}

.cof-sidebar-backdrop {
    display: none;
}

.cof-sidebar-toggle {
    display: none;
    align-items: center;
    gap: 6px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    transition: border-color 0.15s ease, color 0.15s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.cof-filter-reset {
    display: none;
    align-items: center;
    gap: 5px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.cof-filter-reset:hover {
    border-color: #9ca3af;
    color: #374151;
    background: #f3f4f6;
}

/* ---- Filters ---- */

.cof-search-filters {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

/* Category Chips */
.cof-category-chips-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
}

.cof-chip-arrow {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    background: #f3f4f6;
    color: #374151;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, background 0.15s ease;
    padding: 0;
}

.cof-chip-arrow.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.cof-chip-arrow:hover {
    background: #e5e7eb;
    color: #00539B;
}

.cof-category-chips {
    display: flex;
    flex: 1;
    min-width: 0;
    gap: 10px;
    overflow-x: auto;
    padding: 6px 24px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-mask-image: linear-gradient(to right, transparent, black 32px, black calc(100% - 32px), transparent);
    mask-image: linear-gradient(to right, transparent, black 32px, black calc(100% - 32px), transparent);
}

.cof-category-chips::-webkit-scrollbar {
    display: none;
}

.cof-category-chip {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border: 1px solid #d1d5db;
    border-radius: 24px;
    background: #fff;
    font-size: 15px;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
    user-select: none;
    scroll-snap-align: start;
}

.cof-category-chip:hover {
    border-color: #00539B;
    color: #00539B;
    background: #f0f7ff;
}

.cof-category-chip.is-active {
    border-color: #00539B;
    background: #00539B;
    color: #fff;
}

.cof-category-chip__x {
    display: none;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    margin-left: 2px;
}

.cof-category-chip.is-active .cof-category-chip__x {
    display: inline;
}

/* Active Filter Bubbles */
.cof-active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: center;
    padding: 4px 0 28px;
}

.cof-active-filters:empty {
    display: none;
    padding: 0;
}

.cof-filter-bubble {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 22px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    animation: cof-bubble-in 0.2s ease both;
}

.cof-filter-bubble--category {
    background: #00539B;
    color: #fff;
}

.cof-filter-bubble--term {
    background: #374151;
    color: #fff;
}

.cof-filter-bubble__type {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.7;
}

.cof-filter-bubble__text {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cof-filter-bubble__remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 2px;
    width: 18px;
    height: 18px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    transition: background 0.15s ease;
}

.cof-filter-bubble__remove:hover {
    background: rgba(255, 255, 255, 0.45);
}

.cof-filter-bubble--clear {
    background: transparent;
    color: #dc2626;
    cursor: pointer;
    border: 2px solid #dc2626;
    padding: 7px 12px;
    font-size: 12px;
    font-weight: 600;
    gap: 5px;
}

.cof-filter-bubble--clear:hover {
    background: #fef2f2;
    border-color: #b91c1c;
    color: #b91c1c;
}

.cof-filter-bubble--clear .cof-filter-bubble__remove {
    background: #fee2e2;
    color: #dc2626;
    width: 16px;
    height: 16px;
    font-size: 12px;
}

.cof-filter-bubble--clear:hover .cof-filter-bubble__remove {
    background: #fecaca;
    color: #b91c1c;
}

@keyframes cof-bubble-in {
    from { opacity: 0; transform: scale(0.85); }
    to   { opacity: 1; transform: scale(1); }
}

/* Type Tabs */
.cof-type-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 0;
}

.cof-type-tab {
    padding: 10px 20px;
    border: none;
    background: none;
    font-size: 14px;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    position: relative;
    transition: color 0.15s ease;
    white-space: nowrap;
    margin-bottom: -2px;
    border-bottom: 2px solid transparent;
}

.cof-type-tab:hover {
    color: #111827;
}

.cof-type-tab--active {
    color: #00539B;
    border-bottom-color: #00539B;
}

.cof-facet-count {
    font-size: 12px;
    font-weight: 400;
    color: #9ca3af;
    margin-left: 4px;
}

.cof-type-tab--active .cof-facet-count {
    color: #00539B;
}

/* ---- Search Toolbar (meta + sort) ---- */

.cof-search-toolbar {
    display: flex;
    align-items: center;
    padding: 12px 0;
    gap: 12px;
}

.cof-search-meta {
    font-size: 14px;
    color: #6b7280;
}

.cof-toolbar-spacer {
    flex: 1;
}

.cof-search-meta strong {
    color: #111827;
}

.cof-sort-control {
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") no-repeat right 10px center;
    padding: 8px 30px 8px 12px;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    outline: none;
    transition: border-color 0.15s ease;
    white-space: nowrap;
    flex-shrink: 0;
    max-width: 150px;
}

.cof-sort-control:hover {
    border-color: #9ca3af;
}

.cof-sort-control:focus {
    border-color: #00539B;
    box-shadow: 0 0 0 2px rgba(0, 83, 155, 0.1);
}

.cof-sort-dir-toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: none;
    background: none;
    padding: 4px 2px;
    font-size: 12px;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    outline: none;
    white-space: nowrap;
    flex-shrink: 0;
    line-height: 1;
    margin-left: auto;
}

.cof-sort-dir-toggle:hover {
    color: #111827;
}

.cof-sort-dir-icon {
    transition: transform 0.2s ease;
}

.cof-sort-dir-toggle.is-asc .cof-sort-dir-icon {
    transform: rotate(180deg);
}

/* ---- Result Cards ---- */

.cof-search-results {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.cof-result-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px 24px;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
    animation: cof-card-in 0.25s ease both;
}

.cof-result-card:hover {
    border-color: #00539B;
    box-shadow: 0 4px 16px rgba(0, 83, 155, 0.1);
    text-decoration: none;
}

@keyframes cof-card-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.cof-result-card__header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.cof-result-card__badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1;
    flex-shrink: 0;
}

.cof-result-card__badge--page {
    background: #dbeafe;
    color: #1d4ed8;
}

.cof-result-card__badge--document {
    background: #fef3c7;
    color: #92400e;
}

.cof-result-card__badge--transparency {
    background: #dcfce7;
    color: #166534;
}


.cof-result-card__score {
    font-size: 11px;
    color: #9ca3af;
    margin-left: auto;
}

.cof-result-card__title {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 6px;
    line-height: 1.3;
}

.cof-result-card__title em {
    font-style: normal;
    background: #fef08a;
    border-radius: 2px;
    padding: 0 2px;
}

.cof-result-card__snippet {
    font-size: 14px;
    color: #4b5563;
    line-height: 1.5;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cof-result-card__snippet.is-expanded {
    -webkit-line-clamp: unset;
    overflow: visible;
}

.cof-snippet-toggle {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: none;
    border: none;
    padding: 6px 0;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 700;
    color: #00539B;
    cursor: pointer;
}

.cof-snippet-toggle::after {
    content: '▾';
    font-size: 11px;
    transition: transform 0.15s ease;
}

.cof-snippet-toggle.is-open::after {
    transform: rotate(180deg);
}

.cof-snippet-toggle:hover {
    color: #003d73;
}

.cof-result-card__snippet em {
    font-style: normal;
    font-weight: 600;
    color: #111827;
}

.cof-result-card__url {
    font-size: 12px;
    color: #00539B;
    word-break: break-all;
    display: flex;
    align-items: center;
    gap: 4px;
}

.cof-result-card__url svg {
    flex-shrink: 0;
}

/* Date metadata */
.cof-result-card__date-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #f3f4f6;
}

.cof-result-card__date-label {
    font-size: 11px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.cof-result-card__date-value {
    font-size: 12px;
    color: #374151;
}

/* Related documents */
.cof-result-card__docs {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #f3f4f6;
}

.cof-result-card__docs-title {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.cof-result-card__doc-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: #00539B;
    text-decoration: none;
    padding: 3px 0;
    margin-right: 16px;
}

.cof-result-card__doc-link:hover {
    text-decoration: underline;
}

.cof-result-card__doc-link svg {
    flex-shrink: 0;
}

/* ---- Skeleton Loading ---- */

.cof-skeleton-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px 24px;
}

.cof-skeleton-line {
    height: 14px;
    background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
    background-size: 200% 100%;
    animation: cof-shimmer 1.5s infinite;
    border-radius: 6px;
    margin-bottom: 10px;
}

.cof-skeleton-line--title {
    height: 20px;
    width: 65%;
}

.cof-skeleton-line--snippet {
    width: 90%;
}

.cof-skeleton-line--short {
    width: 40%;
}

@keyframes cof-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ---- Pagination ---- */

.cof-search-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    margin-top: 32px;
    padding: 16px 0;
}

.cof-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
}

.cof-page-btn:hover {
    border-color: #00539B;
    color: #00539B;
    background: #f0f7ff;
}

.cof-page-btn--active {
    background: #00539B;
    border-color: #00539B;
    color: #fff;
}

.cof-page-btn--active:hover {
    background: #003d73;
    color: #fff;
}

.cof-page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.cof-page-ellipsis {
    padding: 0 6px;
    color: #9ca3af;
    user-select: none;
}

/* ---- Empty State ---- */

.cof-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
}

.cof-empty-state__icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.4;
}

.cof-empty-state__title {
    font-size: 20px;
    font-weight: 700;
    color: #374151;
    margin: 0 0 8px;
}

.cof-empty-state__text {
    font-size: 15px;
    margin: 0;
}

/* Help Button & Modal */
.cof-help-btn {
    position: relative;
    top: -78px;
    left: 100.5%;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    border: 1px solid #d1d5db;
    background: #fff;
    color: #9ca3af;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
    transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
    z-index: 2;
}

.cof-help-btn:hover {
    border-color: #00539B;
    color: #fff;
    background: #00539B;
}

/* Mobile help button — hidden on desktop */
.cof-help-btn-mobile {
    display: none;
}

.cof-help-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cof-help-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

.cof-help-modal__content {
    position: relative;
    background: #fff;
    border-radius: 12px;
    padding: 32px 36px;
    max-width: 560px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.cof-help-modal__close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 28px;
    color: #9ca3af;
    cursor: pointer;
    line-height: 1;
    padding: 4px;
}

.cof-help-modal__close:hover {
    color: #374151;
}

.cof-help-modal__content h2 {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 20px;
}

.cof-help-modal__content h3 {
    font-size: 14px;
    font-weight: 700;
    color: #00539B;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 20px 0 8px;
}

.cof-help-modal__content h3:first-of-type {
    margin-top: 0;
}

.cof-help-modal__content ul {
    margin: 0 0 4px;
    padding-left: 20px;
}

.cof-help-modal__content li {
    font-size: 14px;
    color: #374151;
    line-height: 1.6;
    margin-bottom: 4px;
    list-style: auto;
}

/* ---- Responsive ---- */

@media (max-width: 768px) {
    /* Layout */
    .cof-search-layout {
        flex-direction: column;
    }

    /* Sidebar — 80% overlay on mobile */
    .cof-transparency-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: 80% !important;
        min-width: 80% !important;
        height: 100%;
        background: #fff;
        z-index: 1000;
        padding: 20px !important;
        overflow-y: auto;
        transform: translateX(-100%);
        opacity: 1 !important;
        transition: transform 0.3s ease;
        border-radius: 0;
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
        display: flex;
        flex-direction: column;
    }

    .cof-transparency-sidebar.is-visible {
        transform: translateX(0);
    }

    .cof-sidebar-content {
        flex: 1;
        overflow-y: auto;
    }

    .cof-sidebar-close {
        display: flex;
    }

    .cof-sidebar-submit {
        display: block;
        width: 100%;
        padding: 14px;
        margin-top: 16px;
        background: #00539B;
        color: #fff;
        border: none;
        border-radius: 10px;
        font-size: 15px;
        font-weight: 600;
        cursor: pointer;
        flex-shrink: 0;
    }

    .cof-sidebar-submit:active {
        background: #003d73;
    }

    .cof-sidebar-backdrop {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.4);
        z-index: 999;
    }

    .cof-sidebar-backdrop.is-visible {
        display: block;
    }

    .cof-sidebar-toggle[style*="inline-flex"] {
        display: inline-flex !important;
    }

    /* Page container */
    .cof-search-page {
        padding: 0 16px;
    }

    /* Hero */
    .cof-search-hero {
        padding: 32px 0 24px;
    }

    .cof-search-hero-title {
        font-size: 24px;
    }

    /* Search input group */
    .cof-search-input-group--large {
        border-radius: 12px;
    }

    .cof-search-input-group--large .cof-category-select {
        width: 48px;
        min-width: 48px;
        max-width: 48px;
        border-right: 1px solid #e5e7eb;
        border-bottom: none;
        padding: 12px;
        font-size: 0;
        color: transparent;
        background-image:
            url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='M23 21v-2a4 4 0 0 0-3-3.87'/%3E%3Cpath d='M16 3.13a4 4 0 0 1 0 7.75'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: center;
        flex-shrink: 0;
    }

    .cof-search-input-group--large .cof-search-input {
        padding: 14px 40px 14px 18px;
        font-size: 16px;
    }

    /* Category chips slider */
    .cof-category-chips {
        padding: 6px 8px;
        gap: 8px;
        -webkit-mask-image: linear-gradient(to right, transparent, black 12px, black calc(100% - 12px), transparent);
        mask-image: linear-gradient(to right, transparent, black 12px, black calc(100% - 12px), transparent);
    }

    .cof-category-chip {
        padding: 8px 14px;
        font-size: 14px;
    }

    /* Active filter bubbles */
    .cof-active-filters {
        padding: 4px 0 16px;
        gap: 8px;
    }

    .cof-filter-bubble {
        padding: 8px 14px;
        font-size: 13px;
    }

    .cof-filter-bubble__text {
        max-width: 140px;
    }

    /* Type tabs */
    .cof-type-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .cof-type-tabs::-webkit-scrollbar {
        display: none;
    }

    .cof-type-tab {
        padding: 8px 14px;
        font-size: 13px;
    }

    /* Toolbar */
    .cof-search-toolbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .cof-sort-control {
        width: 100%;
        max-width: none;
    }

    /* Result cards */
    .cof-result-card {
        padding: 16px;
    }

    .cof-result-card__title {
        font-size: 16px;
    }

    .cof-result-card__date-info {
        flex-wrap: wrap;
    }

    /* Pagination */
    .cof-search-pagination {
        margin-top: 20px;
        gap: 3px;
    }

    .cof-page-btn {
        min-width: 36px;
        height: 36px;
        padding: 0 8px;
        font-size: 13px;
    }

    /* Empty state */
    .cof-empty-state {
        padding: 40px 16px;
    }

    .cof-empty-state__icon svg {
        width: 36px;
        height: 36px;
    }

    .cof-empty-state__title {
        font-size: 18px;
    }

    /* Help — hide floating "?" icon, show mobile link */
    .cof-help-btn {
        display: none;
    }

    .cof-help-btn-mobile {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        margin: 10px auto 0;
        padding: 6px 14px;
        background: none;
        border: 1px solid #d1d5db;
        border-radius: 20px;
        color: #6b7280;
        font-size: 13px;
        font-weight: 500;
        cursor: pointer;
        transition: border-color 0.15s ease, color 0.15s ease;
    }

    .cof-help-btn-mobile:hover {
        border-color: #00539B;
        color: #00539B;
    }

    .cof-help-btn-mobile svg {
        flex-shrink: 0;
    }

    /* Help modal — mobile adjustments */
    .cof-help-modal__content {
        padding: 24px 20px;
        width: 95%;
        max-height: 85vh;
        border-radius: 10px;
    }

    .cof-help-modal__content h2 {
        font-size: 18px;
        margin-bottom: 16px;
        padding-right: 28px;
    }

    .cof-help-modal__content h3 {
        font-size: 13px;
    }

    .cof-help-modal__content li {
        font-size: 13px;
    }
}
