﻿:root {
    --green: #0b6b3a;
    --green-2: #0f8a4b;
    --text: #1a1a1a;
    --muted: #6b7280;
    --border: #e6e6e6;
    --bg: #ffffff;
    --card: #ffffff;
    --shadow: 0 1px 2px rgba(0, 0, 0, .06);
    --radius: 10px;
}

.glossary__header {
    display: flex;
    flex-direction: column;
    gap: 12px;

    position: static;
    top: 0;
    z-index: 10;
    background-color: white;
    padding-bottom: 8px;
}

/* Search */
.search {
    display: flex;
    align-items: center;
    gap: 10px;
}

.search__input {
    flex: 1;
    height: 40px;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0 12px;
    background: var(--bg);
    outline: none;
}

.search__input:focus {
    border-color: var(--green-2);
    box-shadow: 0 0 0 3px rgba(15, 138, 75, .15);
}

.search__btn {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: var(--green);
    color: #fff;
    display: grid;
    place-items: center;
    cursor: pointer;
    box-shadow: var(--shadow);
}

.search__btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* A-Z */
.az {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.az__scroller {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
}

.az__scroller::-webkit-scrollbar {
    display: none;
}

.az__btn {
    width: 30px;
    height: 30px;
    border-radius: 999px;
    border: 2px solid var(--green);
    background: #fff;
    color: var(--green);
    font-weight: 700;
    font-size: 13px;
    line-height: 1;
    display: grid;
    place-items: center;
    cursor: pointer;
    user-select: none;
    transition: background-color .15s ease, color .15s ease, border-color .15s ease;
    justify-content: center;
}

/* Hover: solo scurimento minimo */
.az__btn:not([aria-disabled="true"]):not([aria-current="true"]):hover {
    background: rgba(11, 107, 58, 0.10);
}

/* Focus tastiera */
.az__btn:not([aria-disabled="true"]):focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(15, 138, 75, .18);
}

/* Selezionata */
.az__btn[aria-current="true"] {
    background: var(--green);
    color: #fff;
}

/* Disabilitata */
.az__btn[aria-disabled="true"] {
    opacity: .35;
    border-color: #9ca3af;
    color: #6b7280;
    cursor: default;
}


.az__progressRow{
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;     /* ðŸ”’ blocca il wrap */
}

/* Track */
.az__progress{
  flex: 1 1 auto;
  min-width: 0;          /* ðŸ”‘ fondamentale */
  height: 6px;
  background: #cfe7d9;
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}

/* Thumb */
.az__progressFill{
  position: absolute;
  inset: 0 auto 0 0;
  background: var(--green);
  border-radius: 999px;
  will-change: transform;
}

/* Freccia */
.az__arrow{
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  background: transparent;
  display: grid;
  place-items: center;
}

.az__arrow:disabled {
    opacity: .35;
    cursor: default;
}

.az__chevLeft, .az__chevRight {
    width: 8px;
    height: 8px;
    display: inline-block;
    border: solid var(--green);
    border-width: 0 2px 2px 0;
    transform: rotate(-45deg);
}

.az__chevLeft{
    transform: rotate(135deg);
}

/* Results */
.results {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 10px;
}

.card {
    background: var(--card);
    box-shadow: 0 3px 10px 0 rgba(0, 0, 0, 0.1);
    padding: 14px 14px;
}

.card__title {
    margin: 0 0 8px;
    font-size: 14px;
    letter-spacing: .02em;
    font-weight: 800;
    text-transform: uppercase;
    color: black;
}

.card__body {
    margin: 0;
    color: #3f3f46;
    font-size: 13px;
    line-height: 1.35rem;
}

.empty {
    color: var(--muted);
    text-align: center;
    margin-top: 16px;
}

/* helper */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Desktop */
@media (min-width: 767px) {
    .search__input {
        height: 44px;
    }

    .search__btn {
        width: 44px;
        height: 44px;
    }

    .az__scroller {
        overflow-x: visible;
        flex-wrap: wrap;
        row-gap: 10px;
        display: flex;
        justify-content: space-between;
    }

    /* su desktop puoi anche nascondere progress+freccia se vuoi */
    /* .az__progressRow{ display:none; } */
}