/* ============================================================
   PROCUREMENT GLOSSARY PAGE — Provision Connect
   education/procurement-glossary.cfm
   ============================================================ */

/* ── Stats bar ──────────────────────────────────────────────── */
.gl-stats-bar {
    background: linear-gradient(135deg, #262b2f 0%, #31383c 100%);
    padding: 20px 0;
    border-bottom: 2px solid rgba(255,127,75,0.25);
}
.gl-stats-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    gap: 36px;
    align-items: center;
    flex-wrap: wrap;
}
.gl-stat { display: flex; flex-direction: column; }
.gl-stat-val {
    font-family: 'Outfit', sans-serif;
    font-size: 1.65rem;
    font-weight: 800;
    color: #ff7f4b;
    line-height: 1;
}
.gl-stat-lbl {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.74rem;
    font-weight: 600;
    color: rgba(255,255,255,0.5);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin-top: 3px;
}
.gl-showing {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.87rem;
    color: rgba(255,255,255,0.4);
    margin-left: auto;
}

/* ── Filter strip ───────────────────────────────────────────── */
.gl-filter-section {
    background: #fff;
    border-bottom: 1px solid #eef0f3;
    padding: 22px 0 18px;
    position: sticky;
    top: 0;
    z-index: 99;
    box-shadow: 0 2px 16px rgba(0,0,0,.07);
}
.gl-filter-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}
.gl-search-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}
.gl-search-wrap {
    position: relative;
    flex: 1;
    max-width: 500px;
    min-width: 220px;
}
.gl-search-wrap .gl-search-icon {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    color: #b8bdc5;
    font-size: 0.88rem;
    pointer-events: none;
}
.gl-search-input {
    width: 100%;
    height: 42px;
    border: 1.5px solid #e8ebef;
    border-radius: 8px;
    padding: 0 14px 0 38px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.92rem;
    color: #2c3e50;
    background: #f8f9fa;
    transition: border-color 0.2s, background 0.2s;
}
.gl-search-input:focus {
    outline: none;
    border-color: #ff7f4b;
    background: #fff;
}
.gl-search-input::placeholder { color: #b8bdc5; }
.gl-clear-btn {
    display: none;
    align-items: center;
    gap: 6px;
    height: 42px;
    padding: 0 16px;
    border: 1.5px solid #e8ebef;
    border-radius: 8px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    color: #8895a7;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
    white-space: nowrap;
}
.gl-clear-btn:hover { border-color: #ff7f4b; color: #ff7f4b; }

.gl-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
}
.gl-pill {
    padding: 5px 14px;
    border-radius: 50px;
    border: 1.5px solid #e8ebef;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    color: #5a6c7d;
    cursor: pointer;
    transition: all 0.18s;
    background: #fff;
    white-space: nowrap;
    line-height: 1.5;
}
.gl-pill:hover   { border-color: #ff7f4b; color: #ff7f4b; }
.gl-pill.active  { background: #ff7f4b; border-color: #ff7f4b; color: #fff; }

/* Per-category pill colors via --gc custom property */
.gl-pill.cat-pill:hover  { border-color: var(--gc, #ff7f4b); color: var(--gc, #ff7f4b); background: rgba(0,0,0,.02); }
.gl-pill.cat-pill.active { background: var(--gc, #ff7f4b); border-color: var(--gc, #ff7f4b); color: #fff; }

/* A-Z strip */
.gl-az { display: flex; flex-wrap: wrap; gap: 4px; }
.gl-az-btn {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: 1px solid #eef0f3;
    font-size: 0.77rem;
    font-weight: 700;
    font-family: 'DM Mono', monospace;
    color: #cdd2da;
    cursor: default;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    padding: 0;
}
.gl-az-btn.has-terms { color: #2c3e50; border-color: #dde1e7; cursor: pointer; }
.gl-az-btn.has-terms:hover { border-color: #ff7f4b; color: #ff7f4b; }
.gl-az-btn.active { background: #ff7f4b; border-color: #ff7f4b; color: #fff; }

/* ── Term grid ──────────────────────────────────────────────── */
.gl-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 14px;
    align-items: start;
}

/* ── Term card ──────────────────────────────────────────────── */
.gl-card {
    background: #fff;
    border: 1px solid #e8ebef;
    border-top: 3px solid var(--gc, #ff7f4b);
    border-radius: 0 0 12px 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    display: flex;
    flex-direction: column;
}
.gl-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(0,0,0,.09);
}
.gl-card-head { padding: 14px 16px 12px; }
.gl-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 4px;
}
.gl-term-name {
    font-family: 'Outfit', sans-serif;
    font-size: 0.97rem;
    font-weight: 700;
    color: #2c3e50;
    line-height: 1.3;
}
.gl-toggle-icon {
    flex-shrink: 0;
    font-size: 0.72rem;
    color: #c8cdd6;
    margin-top: 4px;
    transition: transform 0.2s;
}
.gl-card.expanded .gl-toggle-icon { transform: rotate(180deg); }

.gl-acronym-badge {
    display: inline-block;
    font-family: 'DM Mono', monospace;
    font-size: 0.68rem;
    font-weight: 700;
    background: var(--gc, #ff7f4b);
    color: #fff;
    padding: 2px 7px;
    border-radius: 4px;
    margin-bottom: 5px;
    white-space: nowrap;
}
.gl-cat-tag {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--gc, #ff7f4b);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 7px;
}
.gl-short-def {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.85rem;
    color: #5a6c7d;
    line-height: 1.56;
}

/* Expand panel */
.gl-expand-panel {
    display: none;
    border-top: 1px solid #f0f2f4;
    padding: 14px 16px 16px;
    background: #fafbfc;
}
.gl-card.expanded .gl-expand-panel { display: block; }
.gl-full-def {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.85rem;
    color: #4a5568;
    line-height: 1.68;
    margin-bottom: 10px;
}
.gl-meta-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 8px;
}
.gl-meta-item {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.79rem;
    color: #8895a7;
}
.gl-meta-item strong { color: #5a6c7d; font-weight: 600; }

/* No-results state */
.gl-empty {
    display: none;
    grid-column: 1 / -1;
    text-align: center;
    padding: 72px 0;
    color: #8895a7;
    font-family: 'DM Sans', sans-serif;
}
.gl-empty-icon { font-size: 2.4rem; color: #dde1e7; display: block; margin-bottom: 14px; }
.gl-empty p { font-size: 1rem; margin: 0 0 6px; }
.gl-empty small { font-size: 0.85rem; opacity: 0.75; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 960px) {
    .gl-filter-section { position: static; }
    .gl-grid { grid-template-columns: 1fr 1fr; }
    .gl-stats-inner { gap: 20px; }
    .gl-showing { margin-left: 0; width: 100%; }
}
@media (max-width: 600px) {
    .gl-grid { grid-template-columns: 1fr; }
    .gl-stat-val { font-size: 1.3rem; }
    .gl-search-wrap { max-width: 100%; }
}

/* ── Dark mode ──────────────────────────────────────────────── */
[data-theme="dark"] .gl-filter-section {
    background: #1a1d27;
    border-color: #2d3748;
    box-shadow: 0 2px 16px rgba(0,0,0,.3);
}
[data-theme="dark"] .gl-search-input {
    background: #252b3b;
    border-color: #3a4150;
    color: #e8eaed;
}
[data-theme="dark"] .gl-search-input:focus { border-color: #ff7f4b; background: #252b3b; }
[data-theme="dark"] .gl-search-input::placeholder { color: #4a5568; }
[data-theme="dark"] .gl-clear-btn { background: #252b3b; border-color: #3a4150; color: #8895a7; }
[data-theme="dark"] .gl-pill { background: #252b3b; border-color: #3a4150; color: #b8bdc5; }
[data-theme="dark"] .gl-pill.active { background: #ff7f4b; border-color: #ff7f4b; color: #fff; }
[data-theme="dark"] .gl-pill.cat-pill.active { background: var(--gc, #ff7f4b); border-color: var(--gc, #ff7f4b); }
[data-theme="dark"] .gl-az-btn { background: #252b3b; border-color: #3a4150; color: #3a4150; }
[data-theme="dark"] .gl-az-btn.has-terms { color: #e8eaed; border-color: #4a5568; }
[data-theme="dark"] .gl-card { background: #252b3b; border-color: #3a4150; }
[data-theme="dark"] .gl-card:hover { box-shadow: 0 6px 24px rgba(0,0,0,.35); }
[data-theme="dark"] .gl-term-name { color: #e8eaed; }
[data-theme="dark"] .gl-short-def { color: #b8bdc5; }
[data-theme="dark"] .gl-expand-panel { background: #1e2230; border-color: #2d3748; }
[data-theme="dark"] .gl-full-def { color: #b8bdc5; }
[data-theme="dark"] .gl-meta-item { color: #6b7280; }
[data-theme="dark"] .gl-meta-item strong { color: #b8bdc5; }
[data-theme="dark"] .gl-empty { color: #6b7280; }
[data-theme="dark"] .gl-empty-icon { color: #2d3748; }
