/* Abbreviations glossary — search bar, A-to-Z index strip, alphabetical sections. */

.ab-add-btn {
    margin-left: auto; flex-shrink: 0;
    width: 30px; height: 30px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: var(--indigo); color: #fff; font-size: .85rem; text-decoration: none;
    transition: background .12s ease;
}
.ab-add-btn:hover { background: color-mix(in srgb, var(--indigo) 85%, black); }

.ab-category-form { margin-bottom: .85rem; }
.ab-category-form select {
    width: 100%; border: 1px solid var(--border); border-radius: 5px; padding: .55rem .65rem;
    background: var(--paper); color: var(--ink); font-family: inherit; font-size: .88rem;
}

.ab-index {
    display: flex; flex-wrap: wrap; gap: .3rem;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius, 5px);
    padding: .6rem; margin-bottom: 1rem;
    position: sticky; top: .5rem; z-index: 5;
}
.ab-index-letter {
    width: 26px; height: 26px; border-radius: 5px;
    display: flex; align-items: center; justify-content: center;
    font-size: .76rem; font-weight: 700; text-decoration: none;
    color: var(--indigo); background: var(--indigo-soft, var(--paper));
}
.ab-index-letter:hover { background: var(--indigo); color: #fff; }
.ab-index-letter-empty { color: var(--ink-soft); opacity: .35; background: transparent; }

.ab-section { margin-bottom: 1rem; scroll-margin-top: 3.2rem; }
.ab-section-heading {
    font-size: .95rem; font-weight: 800; color: var(--indigo);
    margin: 0 0 .4rem .2rem;
}
.ab-list {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius, 5px);
    overflow: hidden;
}
.ab-row { padding: .7rem .9rem; border-bottom: 1px solid var(--border); }
.ab-row:last-child { border-bottom: none; }
.ab-row-main { display: flex; align-items: baseline; justify-content: space-between; gap: .6rem; flex-wrap: wrap; }
.ab-row-text { display: flex; align-items: baseline; gap: .5rem; flex-wrap: wrap; min-width: 0; }
.ab-row-abbr { font-weight: 800; font-size: .95rem; color: var(--ink); }
.ab-row-full { font-size: .86rem; color: var(--ink-soft); }
.ab-row-category {
    flex-shrink: 0; font-size: .66rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .02em; color: var(--indigo);
    background: var(--indigo-soft, var(--paper)); padding: .1rem .45rem; border-radius: 999px;
}
.ab-row-desc { font-size: .8rem; color: var(--ink-soft); line-height: 1.45; margin: .35rem 0 0; }

@media (max-width: 480px) {
    .ab-index-letter { width: 22px; height: 22px; font-size: .7rem; }
}
