/* Dictionary Page — [bs_dictionary_page] shortcode
 * Scoped under #bs-dictionary-page
 * Brand: #1DB0E1 (blue), #206389 (dark-blue), #171717 (dark-gray), #EDEDED (light-gray)
 */

body:has(#bs-dictionary-page) .page-header { display: none; }
.e-con:has(#bs-dictionary-page) > .elementor-widget-shortcode { width: 100%; }

#bs-dictionary-page {
    --dict-blue: #1DB0E1;
    --dict-blue-hover: #206389;
    --dict-text: #171717;
    --dict-text-muted: #64748b;
    --dict-border: #EDEDED;
    --dict-card-bg: #FAFAFA;
    --dict-white: #FFFFFF;
    --dict-radius: 10px;
    --dict-max-width: 960px;

    max-width: var(--dict-max-width);
    margin: 0 auto;
    padding: 0 16px 48px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--dict-text);
    line-height: 1.6;
}

#bs-dictionary-page a { color: var(--dict-blue); text-decoration: none; transition: color 0.2s; }
#bs-dictionary-page a:hover { color: var(--dict-blue-hover); }

#bs-dictionary-page .bs-dict-card-def a {
    color: #2b7bb9;
    border-bottom: 3px solid #1DB0E1;
    transition: border-bottom-color 0.15s linear, color 0.15s linear;
}

#bs-dictionary-page .bs-dict-card-def a:hover {
    color: #171717;
    border-bottom-color: #171717;
}
#bs-dictionary-page a.bs-dict-az-letter { color: #475569; }
#bs-dictionary-page a.bs-dict-az-letter:hover { color: #206389; }
#bs-dictionary-page a.bs-dict-az-letter--active { color: #FFFFFF; }
#bs-dictionary-page a.bs-dict-az-letter--active:hover { color: #FFFFFF; }
#bs-dictionary-page a.bs-dict-az-letter--disabled { color: #d1d5db; }

/* ── Breadcrumb ───────────────────────────────────── */

#bs-dictionary-page .bs-dict-breadcrumb { font-size: 13px; margin-bottom: 14px; }
#bs-dictionary-page .bs-dict-breadcrumb a { color: var(--dict-text-muted); }
#bs-dictionary-page .bs-dict-breadcrumb a:hover { color: var(--dict-blue); }
.bs-dict-breadcrumb-sep { color: var(--dict-text-muted); margin: 0 6px; }
#bs-dictionary-page .bs-dict-breadcrumb span:last-child { color: var(--dict-text); }

/* ── Hero ─────────────────────────────────────────── */

.bs-dict-hero { margin-bottom: 24px; }

.bs-dict-h1-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.bs-dict-h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--dict-text);
    margin: 0;
    line-height: 1.2;
}

.bs-dict-hero-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(32, 99, 137, 0.1);
    border-radius: 8px;
    color: #206389;
    flex-shrink: 0;
}

.bs-dict-hero-icon svg { width: 20px; height: 20px; }

.bs-dict-subtitle {
    font-size: 15px;
    color: var(--dict-text-muted);
    margin: 6px 0 0 0;
    max-width: 620px;
    line-height: 1.55;
}

/* ── Search ───────────────────────────────────────── */

.bs-dict-search-wrap { margin-bottom: 20px; }

.bs-dict-search-inner {
    position: relative;
    max-width: 480px;
}

.bs-dict-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--dict-text-muted);
    display: flex;
    pointer-events: none;
}

.bs-dict-search-icon svg { width: 18px; height: 18px; }

.bs-dict-search-input {
    width: 100%;
    padding: 10px 14px 10px 42px;
    border: 1px solid var(--dict-border);
    border-radius: 8px;
    font-size: 15px;
    color: var(--dict-text);
    background: var(--dict-white);
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.bs-dict-search-input:focus {
    border-color: var(--dict-blue);
}

.bs-dict-search-input::placeholder {
    color: #94a3b8;
}

/* ── A-Z Navigation ──────────────────────────────── */

.bs-dict-az-nav {
    display: flex;
    gap: 2px;
    margin-bottom: 28px;
    padding: 10px 0;
    position: sticky;
    top: 0;
    background: var(--dict-white);
    z-index: 10;
    border-bottom: 1px solid var(--dict-border);
}

.bs-dict-az-letter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 0;
    height: 32px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 6px;
    color: #475569;
    border: 1px solid transparent;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.bs-dict-az-letter:hover {
    background: #e8f7fc;
    color: #206389;
    border-color: #9AE0F7;
}

.bs-dict-az-letter--active {
    background: #206389;
    color: #FFFFFF;
    border-color: #206389;
}

.bs-dict-az-letter--active:hover {
    background: #1a5474;
    color: #FFFFFF;
    border-color: #1a5474;
}

.bs-dict-az-letter--disabled {
    color: #d1d5db;
    pointer-events: none;
    cursor: default;
}

/* ── Term Sections ───────────────────────────────── */

.bs-dict-letter-section {
    margin-bottom: 32px;
    scroll-margin-top: 60px;
}

.bs-dict-letter-heading {
    font-size: 22px;
    font-weight: 700;
    color: var(--dict-blue-hover);
    margin: 0 0 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--dict-border);
}

.bs-dict-letter-terms {
    display: grid;
    gap: 12px;
}

/* ── Term Cards ──────────────────────────────────── */

#bs-dictionary-page a.bs-dict-card {
    display: block;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}

#bs-dictionary-page a.bs-dict-card:hover { color: inherit; }

.bs-dict-card {
    padding: 16px 20px;
    background: var(--dict-card-bg);
    border: 1px solid var(--dict-border);
    border-radius: var(--dict-radius);
    transition: border-color 0.2s, box-shadow 0.2s;
    scroll-margin-top: 60px;
}

.bs-dict-card:hover {
    border-color: var(--dict-blue);
    box-shadow: 0 2px 8px rgba(29, 176, 225, 0.08);
}

.bs-dict-card-term {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 6px;
    color: var(--dict-text);
}

.bs-dict-card-def {
    font-size: 14px;
    color: var(--dict-text-muted);
    margin: 0;
    line-height: 1.6;
}

/* ── No Results ──────────────────────────────────── */

.bs-dict-no-results {
    text-align: center;
    padding: 48px 20px;
    color: var(--dict-text-muted);
}

.bs-dict-no-results-icon {
    display: block;
    margin-bottom: 12px;
    color: #cbd5e1;
}

.bs-dict-no-results-icon svg { width: 32px; height: 32px; }

.bs-dict-no-results p { font-size: 15px; margin: 0; }

/* ── Hidden during search ────────────────────────── */

.bs-dict-card--hidden { display: none; }
.bs-dict-letter-section--hidden { display: none; }

/* ── Mobile ──────────────────────────────────────── */

@media (max-width: 640px) {
    .bs-dict-h1 { font-size: 22px; }
    .bs-dict-subtitle { font-size: 14px; }

    .bs-dict-az-nav {
        gap: 1px;
        padding: 8px 0;
        flex-wrap: wrap;
    }

    .bs-dict-az-letter {
        flex: 0 0 auto;
        width: 26px;
        height: 28px;
        font-size: 11px;
    }

    .bs-dict-card {
        padding: 12px 14px;
    }

    .bs-dict-card-term { font-size: 15px; }
    .bs-dict-card-def { font-size: 13px; }
    .bs-dict-letter-heading { font-size: 19px; }

    .bs-dict-search-inner { max-width: 100%; }
}
