/* ── GG Search ─────────────────────────────────────────────────────────── */
:root {
    --gg-header-h: 200px;
    --gg-mid: #068241;
    --gg-green-btn: #00ae4d;
    --gg-muted: #918e84;
    --gg-neutral: #efefef;
    --gg-icon-muted: #ccc;
    --gg-heading: #333;
    --gg-border: rgba(145, 141, 131, 0.4);
    --gg-border-faint: rgba(145, 141, 131, 0.15);
    --gg-border-alpha: rgba(145, 141, 131, 0.2);
    --gg-border-light: rgba(145, 141, 131, 0.12);
    --gg-border-card: rgba(145, 141, 131, 0.25);
    --gg-border-white: rgba(255, 255, 255, 0.5);
    --gg-scrollbar-thumb: rgba(145, 141, 131, 0.3);
    --gg-focus-ring: rgba(0, 174, 77, 0.12);
    --gg-tint: #e6f6eb;
    --gg-radius: 10px;
    --gg-radius-lg: 12px;
    --gg-shadow: rgba(20, 40, 20, 0.12) 0px 6px 20px -4px;
    --gg-card-shadow: 0 2px 10px -2px rgba(20, 40, 20, 0.09);
    --gg-card-shadow-hover: 0 6px 24px -4px rgba(20, 40, 20, 0.18);
    --gg-menu-shadow: rgba(20, 40, 20, 0.18) 0px 8px 24px -4px;
}

.gg-search-wrap {
    font-family: 'Jost', sans-serif;
    color: var(--gg-text);
    padding-top: var(--gg-header-h);
}

/* ── Reset global button focus override from system stylesheet ──
   Each button class declares --_bg / --_color that match its resting state.
   The :focus rule reads those variables so focused buttons look identical
   to their normal (non-focused) appearance. ── */
.gg-search-bar__btn,
.gg-filter-toggle-btn,
.gg-reset-all-btn,
.gg-apply-btn,
.gg-doc-card__plus-btn      { --_bg: var(--gg-secondary); --_color: var(--gg-light); }
.gg-active-chip             { --_bg: var(--gg-primary);  --_color: var(--gg-light); }
.gg-sort-btn,
.gg-sel-download-btn        { --_bg: var(--gg-light);            --_color: var(--gg-secondary); }
.gg-sel-reset-btn,
.gg-filter-close            { --_bg: transparent;     --_color: var(--gg-secondary); }

.gg-search-wrap button:focus,
.gg-search-wrap [type=button]:focus,
.gg-search-wrap [type=submit]:focus {
    background-color: var(--_bg, transparent);
    color: var(--_color, inherit);
    text-decoration: none;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SEARCH QUERY LABEL
═══════════════════════════════════════════════════════════════════════════ */
.gg-search-query-label {
    margin: 0 auto;
    max-width: 956px;
    padding: 18px 48px 0;
    font-size: 48px;
    line-height: 1.57;
    font-weight: 700;
    color: var(--gg-secondary);
}

/* ═══════════════════════════════════════════════════════════════════════════
   SEARCH BAR
═══════════════════════════════════════════════════════════════════════════ */
.gg-search-hero {
    margin: 0 auto;
    max-width: 1296px;
    background: var(--gg-light);
    padding: 28px 48px;
    border-bottom: 1px solid var(--gg-border-faint);
}

.gg-search-bar {
    display: flex;
    gap: 12px;
    max-width: 860px;
    margin: 0 auto;
}

.gg-search-bar__input {
    flex: 1;
    background: var(--gg-light);
    color: var(--gg-text);
    border: 1px solid var(--gg-border);
    border-radius: var(--gg-radius);
    font-family: 'Jost', sans-serif;
    font-size: 15px;
    font-weight: 400;
    padding: 13px 18px;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}

.gg-search-bar__input:focus {
    border-color: var(--gg-secondary);
    box-shadow: 0 0 0 3px var(--gg-focus-ring);
}

.gg-search-bar__btn {
    background: var(--gg-secondary);
    color: var(--gg-light);
    border: none;
    border-radius: 9999px;
    font-family: 'Jost', sans-serif;
    font-size: 14px;
    font-weight: 700;
    padding: 0 28px;
    min-height: 48px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    white-space: nowrap;
    transition: background .2s;
}

.gg-search-bar__btn:hover {
    background: var(--gg-primary);
}

/* ═══════════════════════════════════════════════════════════════════════════
   TABS
═══════════════════════════════════════════════════════════════════════════ */
.gg-search-tabs-bar {
    background: var(--gg-light-green);
}

.gg-search-tabs-bar__inner {
    max-width: 1296px;
    margin: 0 auto;
    padding: 0 48px;
    display: flex;
}

.gg-search-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--gg-primary);
    border: none;
    border-top: 2px solid transparent;
    font-family: 'Jost', sans-serif;
    font-size: 18px;
    font-weight: 600;
    padding: 14px 16px 15px;
    cursor: pointer;
    text-decoration: none;
    transition: color .15s, border-color .15s;
}

.gg-search-tab:hover {
    color: var(--gg-text);
    text-decoration: none;
}

.gg-search-tab.is-active {
    color: var(--gg-secondary);
    border-top-color: var(--gg-secondary);
    background-color: var(--gg-light)
}

.gg-search-tab__count {
    background: var(--gg-light);
    color: var(--gg-primary);
    border-radius: 9999px;
    font-size: 16px;
    font-weight: 700;
    padding: 2px 8px;
    line-height: 1.5;
    min-width: 24px;
    text-align: center;
}

.gg-search-tab.is-active .gg-search-tab__count {
    background: var(--gg-secondary);
    color: var(--gg-light);
}

/* ═══════════════════════════════════════════════════════════════════════════
   MAIN LAYOUT
═══════════════════════════════════════════════════════════════════════════ */
.gg-search-main {
    max-width: 1296px;
    margin: 0 auto;
    padding: 24px 48px 80px;
}

/* ── Notice ── */
.gg-search-notice {
    display: flex;
    gap: 32px;
    border: solid 1px var(--gg-neutral);
    padding: 24px;
    margin-bottom: 20px;
    border-radius: 10px;
    align-items: center;
}

.gg-search-notice__icon {
    flex-shrink: 0;
    width: 96px;
    height: 96px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gg-light);
}

.gg-search-notice__text {
    font-size: 16px;
    line-height: 1.5;
    color: var(--gg-text);
    margin: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   FILTER WRAP  (lightGreen-500 container with rounded-2lg)
═══════════════════════════════════════════════════════════════════════════ */
.gg-filter-wrap {
    background: var(--gg-light-green);
    border-radius: var(--gg-radius-lg);
    margin-bottom: 24px;
    overflow: visible;
}

/* ── Filter bar (top row: Filter btn + Sort + Count) ── */
.gg-filter-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 20px;
    justify-content: space-between;
}

.gg-filter-bar__left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* ── Selection actions ── */
.gg-sel-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.gg-sel-actions[hidden] {
    display: none;
}

.gg-sel-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 32px;
    padding: 0 14px;
    border-radius: 9999px;
    background: var(--gg-light);
    color: var(--gg-secondary);
    border: 1.5px solid var(--gg-secondary);
    font-family: 'Jost', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s, color .15s;
}

.gg-sel-download-btn:hover {
    background: var(--gg-secondary);
    color: var(--gg-light);
}

.gg-sel-download-btn:disabled {
    opacity: .6;
    cursor: wait;
}

.gg-sel-download-btn svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}

.gg-sel-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 12px;
    background: var(--gg-secondary);
    color: var(--gg-light);
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
}

.gg-sel-download-btn:hover .gg-sel-badge {
    background: var(--gg-light);
    color: var(--gg-secondary);
}

.gg-sel-reset-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 32px;
    padding: 0 10px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gg-secondary);
    font-family: 'Jost', sans-serif;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    transition: opacity .15s;
}

.gg-sel-reset-btn:hover {
    opacity: .75;
}

.gg-sel-reset-btn svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}

.gg-filter-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--gg-secondary);
    color: var(--gg-light);
    border: none;
    border-radius: 9999px;
    font-family: 'Jost', sans-serif;
    font-size: 16px;
    padding: 5px 14px 5px 10px;
    cursor: pointer;
    height: 32px;
    transition: background .15s;
}

.gg-filter-toggle-btn:hover {
    background: var(--gg-mid);
}

.gg-ft-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.gg-ft-label {
    display: none;
}

@media (min-width: 768px) {
    .gg-ft-label {
        display: inline;
    }
}

.gg-chevron-icon {
    width: 16px;
    height: 16px;
    transition: transform .2s;
}

.gg-chevron-icon.is-up {
    transform: rotate(0deg);
}

.gg-filter-bar__sort {
    gap: 8px;
    order: 3;
    width: 100%;
    justify-content: flex-end;
}
@media (min-width: 768px) {
    .gg-filter-bar {
        justify-content: flex-start;
    }
    .gg-filter-bar__sort {
        order: 0;
        width: auto;
        margin-left: auto;
    }
}

.gg-sort-btn[data-sort="relevance"] {
    display: none;
}

.gg-sort-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    min-width: 100px;
    padding: 0 12px;
    background: var(--gg-light);
    color: var(--gg-secondary);
    border: none;
    border-radius: 9999px;
    font-family: 'Jost', sans-serif;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all .15s;
}

.gg-sort-btn.is-active {
    border: 1.5px solid var(--gg-secondary);
}

.gg-sort-btn:hover {
    background: var(--gg-light);
    color: var(--gg-secondary);
}

.gg-count {
    font-family: 'Jost', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: var(--gg-secondary);
    white-space: nowrap;
    padding: 0 12px;
}

.gg-count strong {
    font-weight: 700;
}

/* ═══════════════════════════════════════════════════════════════════════════
   FILTER PANEL (desktop: inline collapsible / mobile: fixed overlay)
═══════════════════════════════════════════════════════════════════════════ */
.gg-filter-panel {
    border-top: 1px solid var(--gg-border-white);
    display: none; /* closed by default */
    flex-direction: column;
}

.gg-filter-panel.is-open {
    display: flex;
}

.gg-filter-close,
.gg-filter-mobile-title,
.gg-filter-mobile-apply {
    display: none;
}

/* hidden on desktop */

/* ── Mobile overlay ── */
@media (max-width: 1023px) {
    .gg-filter-panel.is-open {
        position: fixed;
        inset: 0;
        z-index: 400;
        background: var(--gg-tint);
        overflow-y: scroll;
        padding: 50px 24px 100px;
    }

    .gg-filter-close {
        display: flex;
        align-items: center;
        justify-content: center;
        align-self: flex-end;
        width: 24px;
        height: 24px;
        color: var(--gg-secondary);
        background: none;
        border: none;
        cursor: pointer;
        margin-bottom: 12px;
    }

    .gg-filter-mobile-title {
        display: block;
        font-size: 20px;
        font-weight: 700;
        color: var(--gg-primary);
        margin: 0 0 20px;
    }

    .gg-filter-mobile-apply {
        display: block;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: var(--gg-light);
        padding: 16px 24px;
    }

    .gg-apply-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        height: 48px;
        background: var(--gg-secondary);
        color: var(--gg-light);
        border: none;
        border-radius: 9999px;
        font-family: 'Jost', sans-serif;
        font-size: 15px;
        font-weight: 700;
        cursor: pointer;
        transition: background .15s;
    }

    .gg-apply-btn:hover {
        background: var(--gg-primary);
    }
}

/* ── Filter dropdowns grid ── */
.gg-filter-grid {
    display: grid;
    grid-template-columns:1fr;
    gap: 16px;
    padding: 20px 24px;
}

@media (min-width: 768px) {
    .gg-filter-grid {
        grid-template-columns:repeat(2, 1fr);
        gap: 12px;
    }
}

@media (min-width: 1024px) {
    .gg-filter-grid {
        grid-template-columns:repeat(4, 1fr);
        gap: 8px;
        padding: 16px 24px;
    }
}

/* ── Active filter chips + Reset all ── */
.gg-active-filters {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 16px 24px;
    border-top: 1px solid var(--gg-border-white);
    justify-content: space-between;
}

.gg-active-filters[hidden] {
    display: none;
}

@media (min-width: 1024px) {
    .gg-active-filters {
        flex-direction: row;
        align-items: center;
        gap: 16px;
    }
}

.gg-active-filters__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 8px;
    flex: 1;
    min-width: 0;
}

.gg-active-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 32px;
    padding: 0 12px;
    background: var(--gg-mid);
    color: var(--gg-light);
    border: none;
    border-radius: 9999px;
    font-family: 'Jost', sans-serif;
    font-size: 16px;
    font-weight: 400;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s;
}

.gg-active-chip:hover {
    background: var(--gg-mid);
}

.gg-active-chip__label {
    white-space: nowrap;
}

.gg-active-chip__remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.gg-active-chip__remove svg {
    width: 16px;
    height: 16px;
    display: block;
}

.gg-active-filters__actions {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.gg-reset-all-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 32px;
    padding: 0 14px 0 10px;
    background: var(--gg-secondary);
    color: var(--gg-light);
    border: none;
    border-radius: 9999px;
    font-family: 'Jost', sans-serif;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s;
}

.gg-reset-all-btn:hover {
    background: var(--gg-mid);
}

.gg-reset-all-btn__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.gg-reset-all-btn__icon svg {
    width: 16px;
    height: 16px;
    display: block;
}

/* ── Per-tab grid visibility ── */
.gg-filter-wrap[data-active-type="document"] [data-filter-for="page"] {
    display: none;
}

.gg-filter-wrap[data-active-type="page"] [data-filter-for="document"] {
    display: none;
}

.gg-filter-wrap[data-active-type="page"] .gg-filter-bar__sort--doc-only {
    display: none;
}

@media (min-width: 768px) {
    .gg-filter-wrap[data-active-type="page"] .gg-count {
        margin-left: auto;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   CUSTOM DROPDOWN (replicates React Select look)
═══════════════════════════════════════════════════════════════════════════ */
.gg-dropdown {
    position: relative;
    width: 100%;
}

.gg-dd__control {
    display: flex;
    align-items: center;
    background: var(--gg-light);
    border: 1px solid var(--gg-border);
    border-radius: var(--gg-radius-lg);
    height: 56px;
    padding: 0 12px;
    cursor: pointer;
    gap: 8px;
    transition: border-color .15s;
}

.gg-dd__control:hover {
    border-color: var(--gg-secondary);
}

.gg-dropdown.is-open .gg-dd__control {
    border-color: var(--gg-secondary);
}

.gg-dd__value-container {
    flex: 1;
    overflow: hidden;
    min-width: 0;
}

.gg-dd__placeholder {
    font-size: 14px;
    color: var(--gg-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gg-dd__single-value {
    font-size: 14px;
    color: var(--gg-text);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Label floats small above value when filter is selected */
.gg-dropdown.has-value .gg-dd__value-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0;
}

.gg-dropdown.has-value .gg-dd__placeholder {
    font-size: 11px;
    line-height: 1.2;
    color: var(--gg-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gg-dd__indicators {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.gg-dd__chevron {
    color: var(--gg-secondary);
    width: 16px;
    height: 16px;
    transition: transform .2s;
}

.gg-dd__chevron.is-up {
    transform: rotate(180deg);
}

/* ── Menu ── */
.gg-dd__menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--gg-light);
    border: 1px solid var(--gg-border-alpha);
    border-radius: var(--gg-radius-lg);
    box-shadow: var(--gg-menu-shadow);
    z-index: 500;
    display: flex;
    flex-direction: column;
    max-height: 300px;
    overflow: hidden;
}

.gg-dd__menu[hidden] {
    display: none;
}

.gg-dd__search-wrap {
    padding: 8px;
    border-bottom: 1px solid var(--gg-border-light);
    flex-shrink: 0;
}

.gg-dd__search-input {
    width: 100%;
    border: 1px solid var(--gg-border);
    border-radius: 8px;
    font-family: 'Jost', sans-serif;
    font-size: 13px;
    padding: 7px 10px;
    outline: none;
    color: var(--gg-text);
    transition: border-color .15s;
}

.gg-dd__search-input:focus {
    border-color: var(--gg-secondary);
}

.gg-dd__menu-list {
    overflow-y: auto;
    padding: 4px 0;
}

.gg-dd__menu-list::-webkit-scrollbar {
    width: 4px;
}

.gg-dd__menu-list::-webkit-scrollbar-thumb {
    background: var(--gg-scrollbar-thumb);
    border-radius: 9999px;
}

.gg-dd__option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    font-size: 14px;
    line-height: 21px;
    color: var(--gg-text);
    cursor: pointer;
    gap: 8px;
    transition: background .1s;
}

.gg-dd__option:hover {
    background: var(--gg-tint);
}

.gg-dd__option.is-selected {
    background: var(--gg-light-green);
    color: var(--gg-primary);
    font-weight: 600;
}

.gg-dd__option.is-disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.gg-dd__option.is-disabled:hover {
    background: transparent;
}

.gg-dd__opt-label {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gg-dd__no-opts {
    padding: 16px 12px;
    font-size: 13px;
    color: var(--gg-muted);
    text-align: center;
}

/* ═══════════════════════════════════════════════════════════════════════════
   LOADER
═══════════════════════════════════════════════════════════════════════════ */
.gg-loader {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
    padding: 24px;
    color: var(--gg-muted);
    font-size: 14px;
}

.gg-loader[hidden] {
    display: none;
}

.gg-spinner {
    color: var(--gg-secondary);
    animation: gg-spin 1s linear infinite;
    flex-shrink: 0;
}

@keyframes gg-spin {
    to {
        transform: rotate(360deg);
    }
}

.gg-results-list.is-loading {
    opacity: .5;
    pointer-events: none;
    transition: opacity .2s;
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESULT CARDS
═══════════════════════════════════════════════════════════════════════════ */
.gg-results-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ── Document card ── */
.gg-doc-card {
    display: flex;
    flex-direction: column; /* < 1280: actions drop to the bottom */
    overflow: hidden;
    border: 1px solid var(--gg-border-card);
    border-radius: 16px;
    background: var(--gg-light);
    box-shadow: var(--gg-card-shadow);
    transition: box-shadow .2s;
}

.gg-doc-card:hover {
    box-shadow: var(--gg-card-shadow-hover);
}

@media (min-width: 1280px) {
    .gg-doc-card {
        flex-direction: row;
        padding-left: 24px;
    }
}

/* body = plus-col + content */
.gg-doc-card__body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    padding: 20px 24px;
    gap: 14px;
}

@media (min-width: 768px) {
    .gg-doc-card__body {
        flex-direction: row;
        gap: 16px;
    }
}

@media (min-width: 1280px) {
    .gg-doc-card__body {
        padding-left: 0;
    }
}

/* plus button column */
.gg-doc-card__plus-col {
    display: none;
    padding-top: 2px;
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .gg-doc-card__plus-col {
        display: block;
    }
}

.gg-doc-card__plus-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--gg-secondary);
    color: var(--gg-light);
    border: none;
    cursor: pointer;
    flex-shrink: 0;
    transition: background .15s;
}

.gg-doc-card__plus-btn svg {
    display: block;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    fill: currentColor;
}

.gg-doc-card__plus-btn:hover {
    background: var(--gg-primary);
}

.gg-doc-card__plus-btn--mobile {
    display: flex;
}

@media (min-width: 768px) {
    .gg-doc-card__plus-btn--mobile {
        display: none;
    }
}

/* plus ↔ × icon swap */
.gg-doc-card__plus-btn .gg-icon-minus {
    display: none;
}

.gg-doc-card__plus-btn.is-selected-btn .gg-icon-plus {
    display: none;
}

.gg-doc-card__plus-btn.is-selected-btn .gg-icon-minus {
    display: block;
}

.gg-doc-card__plus-btn.is-selected-btn {
    background: var(--gg-neutral);
    color: var(--gg-primary);
}


/* content column */
.gg-doc-card__content {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

/* mobile header — visible on mobile+md, hidden on lg */
.gg-doc-card__mobile-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

@media (min-width: 1280px) {
    .gg-doc-card__mobile-header {
        display: none;
    }
}

/* meta block inside mobile header — hidden on mobile, shown on md */
.gg-doc-card__meta-md {
    display: none;
    flex: 1;
    min-width: 0;
}

@media (min-width: 768px) {
    .gg-doc-card__meta-md {
        display: block;
    }
}

/* small thumb in mobile header */
.gg-doc-card__thumb-sm {
    width: 88px;
    height: 88px;
    object-fit: contain;
    flex-shrink: 0;
}

.gg-doc-card__thumb-sm--placeholder {
    width: 88px;
    height: 88px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gg-tint);
    border-radius: 8px;
    color: var(--gg-muted);
}

/* lower content */
.gg-doc-card__lower {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* title: block on mobile, hidden on md, block on lg */
.gg-doc-card__title {
    font-size: 17px;
    font-weight: 600;
    line-height: 1.35;
    color: var(--gg-text);
    margin: 0 0 6px;
}

.gg-doc-card__title--main {
    display: block;
}

@media (min-width: 768px)  and (max-width: 1279px) {
    .gg-doc-card__title--main {
        display: none;
    }
}

/* info row (meta + desc): flex on mobile + lg, hidden on md */
.gg-doc-card__info-row {
    display: flex;
    gap: 24px;
}

@media (min-width: 768px)  and (max-width: 1279px) {
    .gg-doc-card__info-row {
        display: none;
    }
}

/* meta */
.gg-doc-card__meta {
    flex: 1;
    min-width: 0;
    color: var(--gg-muted);
}

.gg-doc-card__meta p {
    margin: 0 0 1px;
}

.gg-doc-meta__type {
    font-size: 14px;
    font-weight: 700;
    color: var(--gg-secondary) !important;
}

.gg-doc-meta__row {
    font-size: 14px;
}

.gg-doc-meta__row--upper {
    text-transform: uppercase;
}

/* description */
.gg-doc-card__desc {
    flex: 1;
    line-height: 1.5;
    color: var(--gg-text);
    margin: 0;
}
.gg-search-wrap .gg-doc-card__desc--inline{
    max-width: 403px;
}
/* inline: full text, no clamp */
.gg-doc-card__desc--inline {
    display: none;
}

@media (min-width: 1280px) {
    .gg-doc-card__desc--inline {
        display: block;
    }
}

/* block (mobile+md): clamp to 3 lines */
.gg-doc-card__desc--block {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (min-width: 1280px) {
    .gg-doc-card__desc--block {
        display: none;
    }
}

/* tags */
.gg-doc-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

/* desktop thumbnail column */
.gg-doc-card__thumb-lg {
    display: none;
}

@media (min-width: 1280px) {
    .gg-doc-card__thumb-lg {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 220px;
        flex-shrink: 0;
        padding: 16px 8px;
    }

    .gg-doc-card__thumb-lg img {
        width: 98px;
        height: 98px;
        object-fit: contain;
    }

    .gg-doc-card__thumb-lg-placeholder {
        width: 88px;
        height: 88px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: var(--gg-tint);
        border-radius: 8px;
        color: var(--gg-muted);
    }
}

/* action buttons */
.gg-doc-card__actions {
    display: flex;
    gap: 2px;
    flex-shrink: 0;
}

@media (min-width: 1280px) {
    .gg-doc-card__actions {
        flex-direction: column;
    }
}

.gg-doc-card__action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    padding: 14px 16px;
    background: var(--gg-secondary);
    color: var(--gg-light);
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background .15s;
}

.gg-doc-card__action-btn:hover {
    background: var(--gg-primary);
    color: var(--gg-light);
    text-decoration: none;
}

@media (min-width: 1280px) {
    .gg-doc-card__action-btn {
        flex: 1;
        width: 48px;
        padding: 20px 13px;
    }
}

/* ── Page card ── */
.gg-page-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--gg-border);
    text-decoration: none;
    color: inherit;
    transition: border-color .2s;
}

.gg-page-card:hover {
    border-color: var(--gg-secondary);
    color: inherit;
    text-decoration: none;
}

@media (min-width: 768px) {
    .gg-page-card {
        flex-direction: row;
        gap: 24px;
        align-items: flex-start;
    }
}

@media (min-width: 1024px) {
    .gg-page-card {
        flex-direction: row-reverse;
        gap: 32px;
    }
}

.gg-page-card__img {
    flex-shrink: 0;
}

.gg-page-card__img img {
    width: 120px;
    border-radius: 12px;
    display: block;
}

@media (min-width: 768px) {
    .gg-page-card__img {
        width: 25%;
    }

    .gg-page-card__img img {
        width: 100%;
        max-width: 173px;
        height: auto;
    }
}

@media (min-width: 1024px) {
    .gg-page-card__img {
        width: auto;
    }

    .gg-page-card__img img {
        width: 173px;
    }
}

.gg-page-card__content {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.gg-page-card__title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--gg-text);
    transition: color .15s;
}

.gg-page-card:hover .gg-page-card__title {
    color: var(--gg-secondary);
}

.gg-page-card__desc {
    margin: 0;
    font-size: 15px;
    line-height: 1.6;
    color: var(--gg-muted);
}

.gg-page-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 6px;
}

/* ── Shared tag pill ── */
.gg-tag-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 28px;
    padding: 0 12px;
    border-radius: 9999px;
    background: var(--gg-border-light);
    font-size: 14px;
    font-weight: 500;
    color: var(--gg-text);
    white-space: nowrap;
}

.gg-tag-pill:has(.gg-tag-pill__dot) {
    padding-left: 5px;
}

.gg-tag-pill__dot {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
}

/* ── Empty state ── */
.gg-results-empty {
    padding: 64px 0;
    text-align: center;
    color: var(--gg-muted);
}

.gg-results-empty__icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 14px;
    color: var(--gg-icon-muted);
}

.gg-results-empty__title {
    font-size: 20px;
    font-weight: 700;
    color: var(--gg-heading);
    margin: 0 0 8px;
}

.gg-results-empty__text {
    font-size: 14px;
    margin: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   PAGINATION
═══════════════════════════════════════════════════════════════════════════ */
.gg-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin-top: 40px;
}

.gg-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 6px;
    border-radius: 50%;
    font-family: 'Jost', sans-serif;
    font-size: 16px;
    text-decoration: none;
    color: var(--gg-text);
    background: var(--gg-light);
    cursor: pointer;
    transition: all .15s;
}

.gg-page-btn:hover {
    background: var(--gg-tint);
    color: var(--gg-secondary);
    text-decoration: none;
    font-weight: 700;
}

.gg-page-btn.active {
    font-weight: 700;
    background: var(--gg-secondary);
    border-color: var(--gg-secondary);
    color: var(--gg-light);
}

.gg-page-btn--nav {
    background: var(--gg-tint);
    color: var(--gg-primary);
    border-radius: 9999px;
    min-width: auto;
    padding: 0 12px;
}
.gg-page-btn--nav:hover {
    background: var(--gg-secondary);
    color: var(--gg-light);
}

.gg-page-btn--nav svg {
    width: 16px;
    height: 16px;
}

.gg-page-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    color: var(--gg-muted);
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════════════════════════ */

/* ── Tablet: 769px – 1023px ── */
@media (max-width: 1023px) {
    .gg-search-query-label {
        padding-left: 24px;
        padding-right: 24px;
        font-size: 32px;
    }

    .gg-search-hero {
        padding-left: 24px;
        padding-right: 24px;
    }

    .gg-search-tabs-bar__inner {
        padding-left: 24px;
        padding-right: 24px;
    }

    .gg-search-main {
        padding-left: 24px;
        padding-right: 24px;
    }

    .gg-search-notice__icon {
        width: 56px;
        height: 56px;
    }

    .gg-search-notice__icon svg {
        width: 28px;
        height: 28px;
    }
}

/* ── Mobile: ≤ 768px ── */
@media (max-width: 768px) {
    .gg-search-query-label {
        padding-left: 16px;
        padding-right: 16px;
        font-size: 24px;
    }

    .gg-search-hero {
        padding-left: 20px;
        padding-right: 20px;
    }

    .gg-search-tabs-bar__inner {
        padding-left: 20px;
        padding-right: 20px;
    }

    .gg-search-main {
        padding: 16px 16px 60px;
    }

    .gg-count {
        display: none;
    }

    .gg-filter-bar {
        padding: 10px 16px;
    }

    .gg-search-notice {
        gap: 16px;
        padding: 16px;
    }

    .gg-search-notice__icon {
        width: 40px;
        height: 40px;
    }

    .gg-search-notice__icon svg {
        width: 20px;
        height: 20px;
    }

    .gg-sel-download-btn span:first-of-type {
        display: none;
    }
}

/* ── Document list panel (?documentlist=…) ─────────────────────────────────── */
.gg-search-wrap.has-doclist .gg-search-hero,
.gg-search-wrap.has-doclist .gg-search-tabs-bar,
.gg-search-wrap.has-doclist .gg-search-main { display: none; }

.gg-doclist {
    margin: 40px auto 0 auto;
    max-width: 1200px;
}

.gg-doclist__head {
    background: var(--gg-tint);
    border-radius: var(--gg-radius-lg);
    padding: 32px 36px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 12px;
}

.gg-doclist__title {
    font-size: 22px;
    font-weight: 700;
    color: var(--gg-mid);
    margin: 0 0 8px;
    line-height: 1.3;
}

.gg-doclist__subtitle {
    font-size: 15px;
    color: var(--gg-mid);
    margin: 0;
}

.gg-doclist__download-btn {
    margin-top: 20px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--gg-green-btn);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 15px 41px;
    font-family: 'Jost', sans-serif;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    text-transform: uppercase;
    transition: background .2s;
}
.gg-doclist__download-btn:hover { background: #055c30; }
.gg-doclist__download-btn:disabled { opacity: .6; cursor: not-allowed; }

.gg-doclist__share-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    font-family: 'Jost', sans-serif;
}

.gg-doclist__share-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--gg-green-btn);
    color: #fff;
    flex-shrink: 0;
    transition: background .2s;
}
.gg-doclist__share-btn:hover{
    background: unset!important;
}
.gg-doclist__share-btn:hover .gg-doclist__share-icon { background: #055c30; }

.gg-doclist__share-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--gg-mid);
}
.gg-search-wrap button.documents-share:focus, .gg-search-wrap .documents-share[type=button]:focus{
    background: var(--gg-secondary);
}
.gg-search-wrap button.documents-share:focus, .gg-search-wrap .documents-share[type=button]:focus svg path{
    fill: var(--gg-light);
}

/* minus icon by default for all doclist cards (all start selected) */
.gg-doclist .gg-doc-card__plus-btn .gg-icon-plus  { display: none; }
.gg-doclist .gg-doc-card__plus-btn .gg-icon-minus { display: block; }
/* deselected state: swap back to plus */
.gg-doclist .gg-doc-card__plus-btn.is-deselected .gg-icon-plus  { display: block; }
.gg-doclist .gg-doc-card__plus-btn.is-deselected .gg-icon-minus { display: none; }

.gg-doclist__list-wrap {
    background: var(--gg-tint);
    border-radius: var(--gg-radius-lg);
    overflow: hidden;
}

.gg-doclist__list-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    font-size: 14px;
    font-weight: 600;
    color: var(--gg-mid);
    border-bottom: 1px solid var(--gg-border-faint);
}

.gg-doclist__count {
    background: #fff;
    color: var(--gg-mid);
    border-radius: 12px;
    padding: 1px 8px;
    font-size: 12px;
    font-weight: 700;
}

.gg-doclist__results {
    padding: 16px 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

@media (max-width: 768px) {
    .gg-doclist__head {
        flex-direction: column;
        align-items: flex-start;
        padding: 24px 20px;
        margin: 0 24px 32px 24px;
    }
    .gg-doclist__results {
        padding: 12px;
    }
}
