/*
 * Language Safari — /browse (continent) and /browse/africa/{country}.
 * Small add-on that rides on holiday-show.css (.hol base + brand vars).
 * Holds only what .hol lacks: the Leaflet map shell, the A–Z language grid,
 * status pills, and the language quick-search. Scoped under .hol.
 */

/* ---- Leaflet map shell (replaces the two duplicated inline #map blocks) ---- */
.saf-map {
    height: 420px; width: 100%;
    border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
    margin: 6px 0 10px; background: var(--surface-2);
}
.hol .info {
    padding: 7px 10px; font: 13px/16px inherit;
    background: rgba(255,255,255,0.9); box-shadow: 0 2px 14px rgba(0,0,0,0.14);
    border-radius: 9px; color: #37414d;
}
.hol .info h3, .hol .info h4 { margin: 0 0 5px; color: var(--ink); font-size: 14.5px; font-weight: 800; }
.hol .legend { line-height: 19px; color: #555; }
.hol .legend i { width: 16px; height: 16px; float: left; margin-right: 8px; opacity: 0.9; border-radius: 3px; }
.hol .make_green { color: var(--green-ink); }
.hol .make_bigger { font-size: 1.05em; }

/* ---- Status pills (Active / Endangered / Extinct) ---- */
.saf-status {
    font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .03em;
    padding: 2px 8px; border-radius: 20px; white-space: nowrap; flex-shrink: 0;
}
.saf-status.is-active { background: rgba(83,214,144,0.16); color: var(--green-ink); }
.saf-status.is-endangered { background: rgba(176,125,0,0.14); color: #b07d00; }
.saf-status.is-extinct { background: rgba(228,77,58,0.12); color: #b23b2c; }
.saf-status.is-unknown { background: #eef0f3; color: var(--muted); }

/* ---- Status distribution row (dot + count) ---- */
.saf-dist { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 6px; }
.saf-dist__item {
    display: inline-flex; align-items: center; gap: 8px;
    border: 1px solid var(--line); border-radius: 10px; padding: 8px 13px; background: var(--surface);
    font-size: 13.5px; font-weight: 600; color: var(--ink);
}
.saf-dist__dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.saf-dist__dot.is-active { background: var(--green); }
.saf-dist__dot.is-endangered { background: #d6a10a; }
.saf-dist__dot.is-extinct { background: #e0705f; }
.saf-dist__num { font-weight: 800; }

/* ---- A–Z jump nav ---- */
.saf-azbar { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0 14px; }
.saf-azbar a {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 28px; height: 28px; padding: 0 4px; border-radius: 7px;
    border: 1px solid var(--line); background: var(--surface);
    font-size: 12.5px; font-weight: 700; color: var(--green-ink); text-decoration: none;
}
.saf-azbar a:hover { background: rgba(83,214,144,0.12); border-color: var(--green); text-decoration: none; }

/* ---- Language grid (country page) ---- */
.saf-letter {
    display: flex; align-items: center; gap: 10px;
    font-size: 15px; font-weight: 800; color: var(--green-ink);
    margin: 20px 0 10px; scroll-margin-top: 16px;
}
.saf-letter::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.saf-langgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(182px, 1fr)); gap: 5px 6px; }
.saf-langchip {
    display: flex; align-items: center; gap: 7px;
    border: 1px solid var(--line); border-left-width: 3px; border-radius: 8px; padding: 6px 10px;
    background: var(--surface); text-decoration: none; color: var(--ink);
    transition: border-color .15s, box-shadow .15s;
}
.saf-langchip:hover { border-color: var(--green); box-shadow: 0 3px 10px rgba(0,0,0,0.06); color: var(--ink); text-decoration: none; }
.saf-langchip.is-endangered { border-left-color: #d6a10a; }
.saf-langchip.is-extinct { border-left-color: #e0705f; }
.saf-langchip__name { font-weight: 700; font-size: 13.5px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.saf-langchip__pop { margin-left: auto; font-size: 11px; color: var(--muted); font-weight: 700; white-space: nowrap; }
.saf-langchip .saf-status { margin-left: auto; font-size: 9px; padding: 1px 6px; }
.saf-langchip__pop + .saf-status { margin-left: 6px; }

/* ---- Language quick-search (Livewire) ---- */
.saf-langsearch { margin-top: 8px; }
.saf-langresults { list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.saf-langresults a {
    display: flex; align-items: center; gap: 9px;
    border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px;
    background: var(--surface); text-decoration: none; color: var(--ink); font-weight: 700; font-size: 14px;
}
.saf-langresults a:hover { border-color: var(--green); color: var(--ink); text-decoration: none; }
.saf-langresults a i { color: var(--green-ink); font-size: 14px; }

.saf-chip-count { color: var(--muted); font-weight: 600; }

@media (max-width: 640px) {
    .saf-map { height: 380px; }
    .saf-langgrid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}
