/* =====================================================================
   BestClassTaker utilities (Nov 2026)
   Small shared helpers loaded on every page after css/site.css:
   icons, screen-reader text, the header blog dropdown, spacing helpers.
   ===================================================================== */

/* Icons: <svg class="icon"><use href="/utility/icons/icons.svg#name"></use></svg> */
.icon { width: 1.25em; height: 1.25em; display: inline-block; vertical-align: -0.2em; flex: none; stroke: currentColor; }
.icon-sm { width: 1em; height: 1em; }
.icon-lg { width: 1.75rem; height: 1.75rem; }
.icon-xl { width: 2.25rem; height: 2.25rem; }

.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.text-center { text-align: center; }
.mt-0 { margin-top: 0 !important; } .mb-0 { margin-bottom: 0 !important; }
.nowrap { white-space: nowrap; }

/* ---------- Header blog dropdown ---------- */
.nav-links .has-dropdown { position: relative; }
.nav-dropdown-toggle {
    display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border: 0; border-radius: 999px; cursor: pointer;
    background: none; color: var(--text-soft, #d5d5e2); font: inherit; font-weight: 500; font-size: .95rem;
}
.nav-dropdown-toggle .icon { width: 16px; height: 16px; transition: transform .3s cubic-bezier(.22,1,.36,1); }
.nav-dropdown-toggle:hover, .has-dropdown.open .nav-dropdown-toggle { color: #fff; background: rgba(255,255,255,.06); }
.has-dropdown.open .nav-dropdown-toggle .icon { transform: rotate(180deg); }
.nav-dropdown {
    position: absolute; top: calc(100% + 12px); right: 0; width: 320px; z-index: 50;
    background: #0f0b18; border: 1px solid rgba(168,85,247,.35); border-radius: 16px; padding: 8px;
    box-shadow: 0 30px 60px -12px rgba(0,0,0,.85);
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity .25s, transform .3s cubic-bezier(.22,1,.36,1), visibility .25s;
}
.has-dropdown.open .nav-dropdown { opacity: 1; visibility: visible; transform: none; }
.nav-dropdown-list {
    list-style: none; margin: 0; padding: 0;
    max-height: 240px; /* five rows visible, the rest scroll */
    overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #a855f7 transparent;
}
.nav-dropdown-list::-webkit-scrollbar { width: 6px; }
.nav-dropdown-list::-webkit-scrollbar-thumb { background: #a855f7; border-radius: 6px; border: 0; }
.nav-dropdown-list a {
    display: flex; align-items: center; height: 48px; padding: 0 14px; border-radius: 10px;
    color: #d5d5e2; font-size: .93rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.nav-dropdown-list a::after { display: none; }
.nav-dropdown-list a:hover, .nav-dropdown-list a:focus-visible { background: rgba(168,85,247,.14); color: #fff; }
.nav-dropdown-all {
    display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; margin-top: 6px;
    border-top: 1px solid rgba(255,255,255,.08); color: #d8b4fe; font-weight: 600; font-size: .9rem;
}
.nav-dropdown-all:hover { color: #fff; }
.nav-dropdown-all::after { display: none; }

@media (max-width: 980px) {
    .nav-links .has-dropdown { position: static; }
    .nav-dropdown-toggle { width: 100%; justify-content: space-between; padding: 14px 16px; font-size: 1.05rem; border-radius: 12px; }
    .nav-dropdown { position: static; width: auto; margin: 4px 0 6px; box-shadow: none; display: none; opacity: 1; visibility: visible; transform: none; background: rgba(255,255,255,.03); }
    .has-dropdown.open .nav-dropdown { display: block; }
}

/* ---------- Lead form status message ---------- */
.form-message { margin-top: 12px; padding: 12px 16px; border-radius: 10px; font-size: .92rem; text-align: center; }
.form-message.is-success { background: rgba(16,185,129,.14); color: #a7f3d0; border: 1px solid rgba(16,185,129,.4); }
.form-message.is-error { background: rgba(239,68,68,.12); color: #fecaca; border: 1px solid rgba(239,68,68,.4); }
