/* ============================================================
   shared.css — shared Solari components used across areas
   (Lookup, Discover, …). Consumes tokens from theme.css.
   Area-specific styles live in lookup.css / discover.css.
   ============================================================ */

/* card shell */
.bx-home {
    font-family: var(--font-body);
    color: var(--sol-ink);
    background: var(--sol-bg);
    margin: 16px 20px;
    padding: 18px 22px 20px;
    border-radius: 8px;
    background-image: radial-gradient(circle at 12% -8%, rgba(232,163,61,.05), transparent 42%);
}
.bx-home-stats {
    margin: 16px 20px 0;
    padding-bottom: 16px;
}

/* section heading */
.bx-section-label {
    display: flex; align-items: baseline; gap: 12px;
    margin: 4px 0 16px;
    padding-bottom: 9px;
    border-bottom: 1px solid var(--sol-line-soft);    
}
.bx-section-label .bx-num {
    font-family: var(--font-mono); font-size: 12px; color: var(--sol-amber); letter-spacing: .1em;
}
.bx-section-label h2 {
    font-family: var(--font-display); font-weight: 600; font-size: 15px;
    letter-spacing: .05em; text-transform: uppercase; color: var(--sol-ink);
}
.bx-section-label .bx-sub {
    font-family: var(--font-mono); font-size: 11px; color: var(--sol-ink-faint); margin-left: auto;
}

/* stats strip (global) */
.bx-strip {
    display: grid; grid-template-columns: repeat(8, 1fr);
    border: 1px solid var(--sol-line); border-radius: var(--sol-radius);
    background: var(--sol-bg-grain); overflow: hidden;
}
.bx-stat {
    padding: 14px 16px; border-right: 1px solid var(--sol-line-soft);
}
.bx-stat:last-child { border-right: none; }
.bx-stat .bx-n {
    font-family: var(--font-display); font-weight: 700; font-size: 23px; line-height: 1;
    color: var(--sol-ink);
}
.bx-stat .bx-l {
    font-family: var(--font-mono); font-size: 10px; color: var(--sol-ink-dim);
    text-transform: uppercase; letter-spacing: .07em; margin-top: 7px;
}
@media (max-width: 900px){ .bx-strip { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 560px){ .bx-strip { grid-template-columns: repeat(2, 1fr); } }

/* shared loading placeholder */
.bx-loading {
    padding: 30px; font-family: var(--font-mono); font-size: 12px; color: var(--sol-ink-faint);
}
select option {
    background: #ffffff;
    color: #1a1a1a;
}
/* ==== Karussell + Kacheln (geteilt: Galleries, Manage, …) ==== */
.carousel {
    display: flex; gap: 12px; overflow-x: auto;
    padding-bottom: 6px; scroll-snap-type: x proximity;
}
.carousel::-webkit-scrollbar { height: 6px; }
.carousel::-webkit-scrollbar-thumb { background: var(--sol-line); border-radius: 3px; }

.tile {
    -webkit-appearance: none;
    appearance: none;    
    flex: 0 0 200px; scroll-snap-align: start;
    background: var(--sol-panel); border: 1px solid var(--sol-line);
    border-radius: var(--sol-radius); padding: 12px 14px;
    display: flex; flex-direction: column; gap: 3px;
    text-align: left; cursor: pointer; font: inherit; color: inherit;
    transition: border-color 0.15s;
}
.tile:hover { border-color: var(--sol-amber); }
.tile.selected { border-color: var(--sol-amber); box-shadow: 0 0 0 1px var(--sol-amber); }
.tile.soon { opacity: .55; cursor: default; }
.tile.soon:hover { border-color: var(--sol-line); }
.tile-title { font-family: var(--font-display); font-weight: 600; font-size: 14px; color: var(--sol-amber); }
.tile-meta { font-family: var(--font-mono); font-size: 10.5px; color: var(--sol-ink-dim); text-transform: uppercase; letter-spacing: 0.04em; }
.tile-badge { font-family: var(--font-mono); font-size: 9px; text-transform: uppercase; letter-spacing: .08em; color: var(--sol-ink-faint); border: 1px solid var(--sol-line-soft); border-radius: 3px; padding: 1px 5px; align-self: flex-start; margin-top: 4px; }

/* ==== Quick Lookup popup (nav bar — reachable from any area, no navigation) ==== */
.ql-overlay {
    position: fixed; inset: 0; z-index: 9998;
    background: rgba(11,18,27,.82);
    display: flex; align-items: flex-start; justify-content: center;
    padding: 8vh 16px 16px;
}
.ql-panel {
    position: relative;
    background: var(--sol-bg); border: 1px solid var(--sol-line);
    border-radius: var(--sol-radius);
    width: 100%; max-width: 640px; max-height: 78vh;
    overflow-y: auto;
    padding: 20px 20px 16px;
}
.ql-close {
    position: absolute; top: 10px; right: 10px;
    width: 30px; height: 30px; border-radius: 50%;
    border: none; background: var(--sol-panel); color: var(--sol-ink-dim);
    font-size: 20px; line-height: 1; cursor: pointer;
}
.ql-close:hover { color: var(--sol-amber); }
.ql-head {
    font-family: var(--font-mono); font-size: 12px; color: var(--sol-ink-dim);
    text-transform: uppercase; letter-spacing: .05em;
    padding-bottom: 12px; margin-bottom: 12px;
    border-bottom: 1px solid var(--sol-line-soft);
}
.ql-results { display: flex; flex-direction: column; gap: 10px; }
.ql-card {
    display: flex; gap: 12px;
    background: var(--sol-panel); border: 1px solid var(--sol-line);
    border-radius: var(--sol-radius); padding: 10px;
}
.ql-thumb {
    flex: 0 0 96px; height: 72px;
    background: var(--sol-bg-grain); border-radius: 3px; overflow: hidden;
    display: flex; align-items: center; justify-content: center;
}
.ql-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ql-thumb-none {
    font-family: var(--font-mono); font-size: 9px; color: var(--sol-ink-faint);
    text-transform: uppercase;
}
.ql-meta { display: flex; flex-direction: column; gap: 2px; justify-content: center; min-width: 0; }
.ql-reg {
    font-family: var(--font-mono); font-weight: 600; font-size: 16px;
    letter-spacing: .06em; color: var(--sol-amber);
}
/* click on a registration = correct it (2026-10-12) */
.ql-reg-edit { cursor: text; display: flex; align-items: center; gap: 6px; }
.ql-reg-pen { font-size: 11px; color: var(--sol-ink-faint); opacity: 0; transition: opacity .15s; }
.ql-reg-edit:hover .ql-reg-pen { opacity: 1; }
@media (hover: none) { .ql-reg-pen { opacity: 1; } }
.ql-reg-input {
    width: 12ch; font-family: var(--font-mono); font-weight: 600; font-size: 15px; letter-spacing: .06em;
    color: var(--sol-amber); background: var(--sol-bg); border: 1px solid var(--sol-amber);
    border-radius: var(--sol-radius); padding: 1px 6px;
}
.ql-reg-btn { padding: 1px 6px; font-size: 12px; letter-spacing: 0; }
.ql-line {
    font-family: var(--font-mono); font-size: 11.5px; color: var(--sol-ink-dim);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ql-line b { color: var(--sol-ink); font-weight: 600; }
/* Quick Lookup sections (2026-10-12): registrations / airlines / airports / types */
.ql-section { display: flex; flex-direction: column; gap: 6px; }
.ql-section + .ql-section { margin-top: 8px; }
.ql-section-head {
    font-family: var(--font-mono); font-size: 11px; color: var(--sol-ink-dim);
    text-transform: uppercase; letter-spacing: .05em;
}
.ql-section-n { color: var(--sol-amber); margin-left: 4px; }
.ql-hit {
    display: grid; grid-template-columns: minmax(3.5em, auto) minmax(0, 1fr) auto; gap: 4px 12px; align-items: center;
    background: var(--sol-panel); border: 1px solid var(--sol-line); border-radius: var(--sol-radius);
    padding: 5px 10px; color: var(--sol-ink); font-family: var(--font-mono); font-size: 12px;
}
.ql-hit-go { padding: 2px 8px; font-size: 11px; justify-self: end; white-space: nowrap; }
.ql-settings { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; text-transform: none; letter-spacing: 0; }
.ql-settings .mg-cat-btn { padding: 2px 8px; font-size: 11px; }
.ql-names { font-size: 11px; }
.ql-more { padding: 0 6px; font-size: 11px; margin-left: 6px; text-transform: none; letter-spacing: 0; }
.ql-error { color: var(--sol-warn); font-family: var(--font-mono); font-size: 12px; }
.ql-hit-codes { display: flex; gap: 4px; align-self: baseline; }
.ql-code { color: var(--sol-amber); font-weight: 600; }
.ql-code + .ql-code { color: var(--sol-ink-dim); font-weight: 400; }
.ql-code-none { color: var(--sol-ink-faint); }
.ql-hit-name { font-family: var(--font-body); overflow-wrap: anywhere; align-self: baseline; }
.ql-hit-sub { color: var(--sol-ink-faint); font-family: var(--font-mono); font-size: 11px; margin-left: 6px; }
/* counts on their own line below the name (2026-10-12) - nice to know, not searched for */
.ql-hit-n { display: block; color: var(--sol-ink-faint); font-family: var(--font-mono); font-size: 9px; text-transform: uppercase; letter-spacing: 0.03em; margin-top: 1px; }
/* a type's IATA codes (2026-10-12): full-width line below the row */
.ql-iata { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 1px; padding: 2px 0 0 2ch; }
.ql-iata-item { font-size: 11px; color: var(--sol-ink-dim); }
.ql-iata-hit { color: var(--sol-ink); font-weight: 600; }
.ql-iata-unofficial .ql-code { border-bottom: 1px dashed var(--sol-amber); }
@media (max-width: 560px) {
    .ql-panel { padding: 16px 14px 12px; }
    .ql-card { flex-direction: column; }
    .ql-thumb { flex-basis: auto; width: 100%; height: 140px; }
}

/* ==== Highlight-tag icon toggles (bottom-right on every image overlay:
   Galleries tiles, Home POTD blocks, Manage thumbnails, the Lightbox) ==== */
.hl-icons {
    position: absolute; bottom: 6px; right: 6px; z-index: 3;
    display: flex; gap: 4px;
}
.hl-icon-btn {
    width: 22px; height: 22px; border-radius: 50%; border: none;
    background: rgba(0,0,0,0.55); color: var(--sol-amber);
    font-size: 11px; line-height: 1; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.15s, color 0.15s;
}
.hl-icon-btn:hover { background: rgba(0,0,0,0.75); }
.hl-icon-btn.active {
    background: rgba(0,0,0,0.75);
    box-shadow: 0 0 0 2px var(--sol-amber);
}

/* Shared Lookup photo tile (lkPhotoTileHtml, app.js) - Drilldown's
   Galleries-style tile, used by every Lookup result (Search, Filter,
   Drilldown, Same Airframe). Builds on galleries.css's .gx-coll-* /
   .gx-cell-* classes; only the bits that differ live here. */
.lk-tile-actions {
    position: absolute; top: 6px; right: 6px; z-index: 2;
    display: flex; gap: 4px;
}
.lk-tile-actions .gx-cell-reload { position: static; }
/* keep the registration clear of the (up to two) action icons */
.lk-tile .gx-cell-topreg { padding-right: 66px; }
.gx-cell-ov span.lk-flight-na { color: var(--sol-ink-dim); }
/* inside a result card (beside its action column) the fixed 5-up grid gets
   too narrow - fill by minimum tile width instead */
.aircraft-card .lk-tile-grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }

/* Second airline of a photo (hybrid livery, renderSecondAirline() in app.js) -
   Categorize Images card head and the lightbox livery row. Amber text/border only. */
.second-airline { display: inline-flex; align-items: center; gap: 4px; }
.second-airline .inline-search { width: 200px; }
.second-airline-chip {
    font-family: var(--font-mono); font-size: 12px; color: var(--sol-amber);
    border: 1px solid var(--sol-line); border-radius: var(--sol-radius); padding: 2px 6px;
    white-space: nowrap;
}
.second-airline-add, .second-airline-x {
    -webkit-appearance: none; appearance: none; background: transparent; cursor: pointer;
    font-family: var(--font-mono); font-size: 12px; color: var(--sol-ink-dim);
    border: 1px dashed var(--sol-line); border-radius: var(--sol-radius); padding: 2px 6px;
    white-space: nowrap;
}
.second-airline-x { border: none; padding: 0 4px; font-size: 14px; }
.second-airline-add:hover, .second-airline-x:hover { color: var(--sol-amber); border-color: var(--sol-amber); }

/* Area tabs (2026-10-07, per the user): the top level of an area as tabs instead of the
   radio-style .mg-cat-btn toggle, which didn't read as belonging to the content below -
   Info (views) and Manage (categories); a toggle stays for sub-levels (Flight Fetch's
   Results / Registry). The active tab opens into the content: line border on three
   sides, its bottom edge in the box colour over the strip's line. Amber text only,
   never a filled amber background. */
.area-tabs { display: flex; flex-wrap: wrap; gap: 2px; border-bottom: 1px solid var(--sol-line); margin: 4px 0 16px; }
.area-tab {
    -webkit-appearance: none; appearance: none; background: transparent; cursor: pointer;
    font-family: var(--font-display); font-size: 15px; font-weight: 600; letter-spacing: 0.02em;
    color: var(--sol-ink-dim); padding: 8px 18px; margin-bottom: -1px;
    border: 1px solid transparent; border-radius: var(--sol-radius) var(--sol-radius) 0 0;
}
.area-tab:hover { color: var(--sol-ink); }
.area-tab:focus-visible { outline: 1px solid var(--sol-amber); outline-offset: -3px; }
.area-tab.active { color: var(--sol-amber); border-color: var(--sol-line); border-bottom-color: var(--sol-bg); background: var(--sol-bg); }
@media (max-width: 600px) { .area-tab { padding: 6px 10px; font-size: 14px; } }

/* Selection actions (2026-10-12): a bar right below selected text - Quick lookup / Copy.
   Light background (inverted to the dark page) plus shadow, so it stands out from the
   text it sits on (house rule: no amber fill - amber only as border on hover) */
.sel-pill {
    position: fixed; z-index: 10000; display: none; gap: 2px;
    max-width: calc(100vw - 16px);
    background: var(--sol-ink); border: 1px solid var(--sol-ink); border-radius: 999px;
    padding: 2px; box-shadow: 0 6px 18px rgba(0, 0, 0, .65);
}
.sel-pill button {
    -webkit-appearance: none; appearance: none; cursor: pointer;
    background: transparent; border: 1px solid transparent; border-radius: 999px;
    color: var(--sol-bg); font-family: var(--font-mono); font-size: 12px; font-weight: 600;
    padding: 5px 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sel-pill button + button { border-left-color: transparent; }
.sel-pill button:hover { border-color: var(--sol-amber); background: rgba(14, 22, 33, .08); }

/* Proof of an aircraft's airline (2026-10-16, acProofHtml() in app.js): confirmed
   marks in full colour, not confirmed ones (📷? / ○) dimmed. */
.ac-proof { font-family: var(--font-mono); font-size: 0.85em; margin-right: 4px; cursor: help; white-space: nowrap; }
.ac-proof-open { color: var(--sol-ink-faint); opacity: 0.75; }

/* "No airline" (2026-10-27): the fixed entry for aircraft without titles - dimmed,
   italic, so it never reads like a real airline name */
.al-none { color: var(--sol-ink-dim); font-style: italic; }

/* Airline search results (airlineSearchItem(), 2026-10-28): the collection airline others
   look like in green on top, an IDENTICAL look-alike dimmed below, "→ target" behind it */
.al-collect { font-weight: 600; }
.al-collect:not(:hover) { color: var(--sol-good) !important; }   /* over lookup.css' item colours */
.al-lookalike { opacity: 0.55; }
.al-tag { font-family: var(--font-mono); font-size: 0.85em; font-weight: normal; }
:not(:hover) > .al-tag { color: var(--sol-ink-dim); }
.al-collect:not(:hover) > .al-tag { color: var(--sol-good); }

/* Click-to-edit (2026-10-27, inlineEdit() in app.js - the app-wide standard):
   a field that can be changed has a faint dotted underline; it turns into an
   input / select on click, flashes green when saved, stays red when it failed */
.ie-field {
    display: inline-block; min-width: 1.6em; padding: 1px 2px;
    font-family: var(--font-mono); font-size: 12.5px; color: var(--sol-ink);
    border-bottom: 1px dotted var(--sol-line); cursor: pointer;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    transition: color 0.3s, border-color 0.3s;
}
.ie-field:hover { border-bottom-color: var(--sol-amber); }
.ie-field.ie-editing { overflow: visible; border-bottom-color: transparent; cursor: default; position: relative; z-index: 5; }
.ie-field.ie-ok { color: var(--sol-good); border-bottom-color: var(--sol-good); }
.ie-field.ie-err { color: var(--sol-warn); border-bottom: 1px solid var(--sol-warn); }
.ie-empty { color: var(--sol-ink-faint); }
/* type-version as one word (A320-214): the type shown only, the version glued to it editable */
.ie-typever { display: inline-flex; align-items: baseline; min-width: 0; white-space: nowrap; }
.ie-prefix { font-family: var(--font-mono); font-size: 12.5px; color: var(--sol-ink); }
.ie-typever > .ie-field { padding-left: 0; min-width: 1em; }
.wl-factory-btn { margin-left: 6px; padding: 0 5px; font-size: 11px; line-height: 1.6; }
.ie-input, .ie-select {
    box-sizing: border-box; width: 9em;
    background: var(--sol-panel-2); color: var(--sol-ink);
    border: 1px solid var(--sol-amber); border-radius: var(--sol-radius);
    font-family: var(--font-mono); font-size: 12.5px; padding: 2px 4px; outline: none;
}
.ie-select { min-width: 150px; }
.ie-airline { min-width: 170px; }
.ie-airline .dup-airline-list { right: auto; min-width: 260px; }
/* iOS zooms into a focused field below 16px */
@media (max-width: 640px) {
    .ie-input, .ie-select, .ie-airline .dup-airline-input { font-size: 16px; }
}
