/* ============================================================
   lookup.css — Lookup area: search section, filters
   (Picture of the Day moved to home.css.)
   Shared components in shared.css, tokens in theme.css.
   ============================================================ */

/* ============================================================
   Lookup search section — Solari override
   ============================================================ */

.search-section {
    background: var(--sol-bg-grain) !important;
    border-bottom: 1px solid var(--sol-line) !important;
    padding: 30px;
}
.search-box {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

/* Search/Filter/Drilldown category toggle panels (2026-09-22) - the
   toggle itself reuses manage.css's .mg-category-toggle/.mg-cat-btn as-is,
   no override needed here. .bx-sub normally sits inline in a flex
   .bx-section-label row (margin-left:auto for right-alignment); standalone
   above .dd-flow it just needs a bit of breathing room below instead. */
.lk-drilldown-sub { display: block; margin: 0 0 14px; }

/* search input */
.search-input {
    background: var(--sol-panel) !important;
    color: var(--sol-ink) !important;
    border: 1px solid var(--sol-line) !important;
    border-radius: var(--sol-radius) !important;
    font-family: var(--font-mono) !important;
    font-size: 13px !important;
    padding: 10px 12px !important;
    max-width: 340px !important;
    flex: 1;
    transition: all 0.3s;
    text-transform: uppercase;
}
.search-input::placeholder { color: var(--sol-ink-faint) !important; }
.search-input:focus {
    border-color: var(--sol-amber) !important;
    box-shadow: none !important;
    outline: none !important;
}

/* buttons */
.search-button {
    background: var(--sol-panel) !important;
    color: var(--sol-amber) !important;
    border: 1px solid var(--sol-line) !important;
    border-radius: var(--sol-radius) !important;
    font-family: var(--font-display) !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    padding: 10px 20px !important;
    cursor: pointer;
    transition: all 0.3s;
}
.search-button:hover {
    border-color: var(--sol-amber) !important;
    transform: none !important;
    box-shadow: none !important;
    filter: none !important;
}

.filter-toggle {
    background: transparent !important;
    color: var(--sol-ink-dim) !important;
    border: 1px solid var(--sol-line) !important;
    border-radius: var(--sol-radius) !important;
    font-family: var(--font-mono) !important;
    font-weight: 500 !important;
}
.filter-toggle:hover {
    color: var(--sol-amber) !important;
    border-color: var(--sol-amber) !important;
    transform: none !important;
    box-shadow: none !important;
}

/* filters panel */
.filters {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
}
.filter-group label {
    color: var(--sol-ink-dim) !important;
    font-family: var(--font-mono) !important;
    font-size: 11px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.filter-group input,
.filter-group select {
    font-family: var(--font-mono) !important;
    font-size: 13px !important;
    background: var(--sol-panel) !important;
    color: var(--sol-ink) !important;
    border: 1px solid var(--sol-line) !important;
    border-radius: var(--sol-radius) !important;
    padding: 10px 12px !important;
    width: 100%;
}
.filter-group input[type="date"]::-webkit-datetime-edit,
.filter-group input[type="date"]::-webkit-datetime-edit-text,
.filter-group input[type="date"]::-webkit-datetime-edit-month-field,
.filter-group input[type="date"]::-webkit-datetime-edit-day-field,
.filter-group input[type="date"]::-webkit-datetime-edit-year-field {
    font-family: var(--font-mono) !important;
    color: var(--sol-ink) !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
}

.filter-group input::placeholder { color: var(--sol-ink-faint) !important; }
.filter-group input:focus, .filter-group select:focus {
    border-color: var(--sol-amber) !important;
    outline: none !important;
}
.filter-group select,
.filter-group input[type="date"] {
    font-weight: 400 !important;
}
/* autocomplete dropdown */
.autocomplete-dropdown {
    background: var(--sol-panel) !important;
    border: 1px solid var(--sol-line) !important;
    color: var(--sol-ink) !important;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    border-radius: 0 0 var(--sol-radius) var(--sol-radius);
    max-height: 240px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}
.autocomplete-item {
    padding: 8px 12px;
    cursor: pointer;
    font-size: 14px;
    border-bottom: 1px solid var(--sol-line);
}
.autocomplete-dropdown div,
.autocomplete-dropdown .autocomplete-item {
    color: var(--sol-ink) !important;
}
.autocomplete-dropdown div:hover,
.autocomplete-dropdown .autocomplete-item:hover {
    background: var(--sol-panel-hi) !important;
    color: var(--sol-amber) !important;
}

/* ============================================================
   03 Drilldown — reuses .filter-group/.autocomplete-*/.search-button
   styling above for the actual controls; these rules are only the
   step-flow layout itself.
   ============================================================ */
/* Two stacked rows, not one shared row: .dd-steps (Airline/Type/IATA, side
   by side) on top, .dd-actions (count + Search button, right-aligned)
   directly below it - per the user, the button belongs under the IATA Type
   select, not squeezed onto the same line. */
.dd-flow {
    display: flex;
    flex-direction: column;
    gap: 24px;
}
/* Airline/Type/IATA together, in their own nowrap row - the three steps
   shrink together (via .dd-step's flex-shrink) rather than ever wrapping
   relative to each other, which is what "side by side" actually requires on
   a screen too narrow for 3x fixed 220px. */
.dd-steps {
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-end;
    gap: 16px;
    min-width: 0;
}
/* flex-grow: 0 (2026-09-19, per the user) - columns stay at their content
   width instead of stretching to fill the row on wide screens; previously
   read "flex: 1 1 140px" (grow:1) despite the comment here claiming no
   grow, which is exactly what made all 3 columns needlessly wide on a PC
   screen ("könnten alle ein wenig kleiner sein und müssten dann auch nicht
   den gesamten Platz einnehmen"). Still shrinks (and still won't wrap
   relative to each other, see .dd-steps above) down to min-width on a
   narrow screen. */
.dd-step {
    flex: 0 1 170px;
    /* keeps each step from shrinking into an unusable sliver; below this the
       row as a whole will need horizontal space rather than wrap, which is
       the intended trade-off (see .dd-steps comment above) */
    min-width: 90px;
}
.dd-step select:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}
/* each .dd-step now stacks a criterion <select> above its value area
   (search-as-you-type input, or a dependent <select>) inside one column */
.dd-val {
    margin-top: 8px;
}
/* right-aligned row below .dd-steps - a flex column child stretches to the
   full row width by default, so justify-content: flex-end here pins count +
   button to the right edge underneath the IATA Type select. */
.dd-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 20px;
}
/* "incl. slides" checkbox right above the Search button (2026-11-01) */
.dd-search-stack {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}
.dd-slides {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--sol-ink-dim);
    font-family: var(--font-mono);
    font-size: 12px;
    cursor: pointer;
    white-space: nowrap;
}
.dd-slides input {
    accent-color: var(--sol-amber);
    margin: 0;
}
.dd-count {
    color: var(--sol-ink-dim);
    font-family: var(--font-mono);
    font-size: 13px;
    white-space: nowrap;
}
#ddSearchBtn:disabled {
    color: var(--sol-ink-faint) !important;
    cursor: not-allowed;
}
#ddSearchBtn:disabled:hover {
    border-color: var(--sol-line) !important;
}

/* Drilldown results grid (ddDisplayResults()/ddPhotoCell(), lookup.js) -
   reuses Galleries' .gx-collection/.gx-coll-item/.gx-cell-* classes as-is,
   just with the registration in the top overlay made clickable (that
   overlay is pointer-events:none by default in galleries.css so overlay
   text never blocks the "open lightbox" click on the image beneath it -
   re-enabling it only on this one span, scoped to this modifier class so
   Galleries' own tiles are unaffected). */
.gx-cell-reg-top.dd-reg-click {
    pointer-events: auto;
    cursor: pointer;
}
.gx-cell-reg-top.dd-reg-click:hover {
    text-decoration: underline;
}

/* ============================================================
   Lookup result cards — Solari override
   ============================================================ */

.aircraft-card, .aircraft-card-drilldown {
    background: var(--sol-panel) !important;
    border: 1px solid var(--sol-line) !important;
    border-radius: var(--sol-radius) !important;
    padding: 16px;
    margin-bottom: 24px;
}
.aircraft-card {
    display: flex;
    gap: 20px;
}
.aircraft-card-drilldown {
    transition: all 0.3s;
}
.aircraft-card:hover {
    box-shadow: none !important;
    transform: none !important;
    border-color: var(--sol-line) !important;
}

/* header band */
.aircraft-header {
    background: transparent !important;
    border-bottom: 1px solid var(--sol-line-soft) !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    padding-bottom: 8px;
}
.aircraft-title {
    color: var(--sol-amber) !important;
    font-family: var(--font-mono) !important;
    font-size: 1.5em;
    font-weight: bold;
}
.aircraft-type {
    color: var(--sol-ink-dim) !important;
    font-size: 1.1em;
}
.aircraft-inline-info {
    color: var(--sol-ink-faint) !important;
}

/* media tiles */
.media-item {
    background: var(--sol-bg-grain) !important;
    border: 1px solid var(--sol-line-soft) !important;
    position: relative;
    aspect-ratio: 4/3;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s;
}
.media-item:hover {
    box-shadow: none !important;
    transform: scale(1.03) !important;
}
.media-badge {
    background: rgba(14,22,33,.85) !important;
    color: var(--sol-amber) !important;
    font-family: var(--font-mono) !important;
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.8em;
    font-weight: 600;
}

/* aircraft tags (badges in header) */
.aircraft-tag {
    background: var(--sol-bg-grain) !important;
    color: var(--sol-ink-dim) !important;
    border: 1px solid var(--sol-line-soft) !important;
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75em;
    font-weight: 500;
    margin-left: 6px;
    vertical-align: middle;
    font-family: Monaco, Consolas, 'Courier New', monospace;
}

/* drill-down / action buttons (were green) */
.drill-down-button {
    background: transparent !important;
    color: var(--sol-ink-dim) !important;
    border: 1px solid var(--sol-line) !important;
    border-radius: var(--sol-radius) !important;
    font-family: var(--font-mono) !important;
    font-weight: 500 !important;
    padding: 8px 16px;
    cursor: pointer;
    transition: all 0.3s;
}
.drill-down-button:hover {
    color: var(--sol-amber) !important;
    border-color: var(--sol-amber) !important;
    background: transparent !important;
    transform: none !important;
    box-shadow: none !important;
}
/* IATA type select — dropdown options readable */
.iata-select-inline option {
    background: #ffffff !important;
    color: #1a1a1a !important;
}
.iata-select-inline option:disabled {
    color: #999999 !important;
}
.iata-select-inline option:checked {
    background: #e8a33d !important;
    color: #1a1a1a !important;
}
.ac-dup-btn {
    display: inline-flex;
    align-items: center;
    background: var(--sol-panel-2);
    border: 1px solid var(--sol-line);
    border-radius: var(--sol-radius);
    color: var(--sol-ink);
    font-size: 12px;
    line-height: 1;
    padding: 3px 6px;
    margin-left: 4px;
    cursor: pointer;
    vertical-align: middle;
    transition: border-color 0.15s, background 0.15s;
}
.ac-dup-btn:hover { border-color: var(--sol-amber); background: var(--sol-panel); }

.ac-search-btn {
    display: inline-flex;
    align-items: center;
    background: var(--sol-panel-2);
    border: 1px solid var(--sol-line);
    border-radius: var(--sol-radius);
    font-size: 12px;
    line-height: 1;
    padding: 3px 6px;
    margin-left: 6px;
    cursor: pointer;
    vertical-align: middle;
    transition: border-color 0.15s, background 0.15s;
}
.ac-search-btn:hover { border-color: var(--sol-amber); background: var(--sol-panel); }

.edit-popover {
    background: var(--sol-panel);
    border: 1px solid var(--sol-line);
    border-radius: var(--sol-radius);
    padding: 12px;
    z-index: 1000;
    min-width: 200px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}
.edit-pop-title {
    font-family: var(--font-display);
    font-size: 13px;
    color: var(--sol-amber);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--sol-line);
}
.ac-edit-btn {
    display: inline-flex; align-items: center;
    background: var(--sol-panel-2);
    border: 1px solid var(--sol-line);
    border-radius: var(--sol-radius);
    font-size: 12px; line-height: 1;
    padding: 3px 6px; margin-left: 6px;
    cursor: pointer; vertical-align: middle;
    transition: border-color 0.15s, background 0.15s;
}
.ac-edit-btn:hover { border-color: var(--sol-amber); background: var(--sol-panel); }
.lightbox-livery {
    margin-top: 8px;
    width: 100%;
}
.results-header {
    font-family: var(--font-mono) !important;
    color: var(--sol-ink-dim) !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    margin-bottom: 20px;
}
.filter-group input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1) brightness(0.8);
    cursor: pointer;
}

/* ============================================================
   Load-bearing rules moved verbatim from style.css (2026-09-17) -
   not overridden by anything, no property analysis needed.
   ============================================================ */

.results-section {
    padding: 0 30px 30px;
}
.results-header:empty {
    margin-bottom: 0;
}
.loading {
    text-align: center;
    padding: 40px;
    color: #6c757d;
    font-size: 1.2em;
}
.error {
    padding: 20px;
    background: #f8d7da;
    color: #721c24;
    border-radius: 10px;
    border: 1px solid #f5c6cb;
}

/* media tiles (base structure) */
.media-section {
    margin-top: 4px;
}
.media-header {
    font-weight: 600;
    margin-bottom: 10px;
    color: #495057;
}
.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
}
.media-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.media-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: white;
    padding: 10px;
    font-size: 0.85em;
}
.media-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
}

/* lightbox (one visual component, moved as a whole) */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}
.lightbox.active {
    display: flex;
}
.lightbox-content {
    max-width: 96%;
    max-height: 95vh;
    position: relative;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.lightbox-image {
    max-width: 100%;
    max-height: 82vh;
    width: auto;
    height: auto;
    object-fit: contain;
    flex-shrink: 0;
}
.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 3em;
    color: white;
    cursor: pointer;
    background: rgba(0,0,0,0.5);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    /* above .lightbox-content (a later positioned sibling): in landscape on a phone
       the image reaches the top-right corner and swallowed the tap on the x */
    z-index: 2;
}
.lightbox-close:hover {
    background: rgba(0,0,0,0.8);
    transform: scale(1.1);
}
.lightbox-imgwrap {
    position: relative;
    display: inline-flex;
    max-width: 100%;
}
/* caption on the top edge (2026-10-28, per the user): the bottom carries cockpit / tails */
.lightbox-info {
    position: absolute;
    left: 0; right: 0; top: 0;
    padding: 10px 64px 34px 14px;
    background: linear-gradient(rgba(0,0,0,0.6), transparent);
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: baseline;
    gap: 4px 14px;
}
.lightbox-tag {
    font-family: var(--font-mono);
    color: #fff;
    font-size: 0.95em;
    text-shadow: 0 1px 3px rgba(0,0,0,0.9);
    min-width: 0;
    max-width: 100%;
    overflow-wrap: break-word;
}
.lightbox-tag strong {
    color: var(--sol-amber);
    font-weight: 700;
}

.iata-select-inline {
    display: inline-block;
    padding: 4px 8px;
    background: #2a2a2a;
    border: 1px solid #555;
    color: #fff;
    border-radius: 4px;
    font-family: var(--font-mono, inherit);
    font-size: 11px;
    line-height: normal;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
}
.iata-select-inline:disabled {
    border: none;
    background: none;
}

.aircraft-content {
    flex: 1;
}
.aircraft-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 180px;
    padding-top: 10px;
}
.action-item {
    display: flex;
    align-items: center;
    gap: 8px;
}
/* only-one-button action-items (e.g. "Create" in the New-Config popover) -
   pushes it right instead of left, where it'd sit at the row start with no
   sibling to justify-content: space-between against. */
.action-item-end {
    justify-content: flex-end;
}
.action-item label {
    color: #aaa;
    font-size: 13px;
    min-width: 90px;
    font-weight: 600;
    margin-bottom: 0;
    white-space: nowrap;
}

.version-input-inline {
    padding: 4px 8px;
    background: #2a2a2a;
    border: 1px solid #555;
    color: #fff;
    border-radius: 4px;
    font-size: 11px;
    flex: 1;
    min-width: 0;
    width: auto;
}

.normalize-btn {
    background: #2a4a7c;
    border: none;
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    width: 40px !important;
    min-width: 40px !important;
    max-width: 40px !important;
    flex-shrink: 0;
}
.normalize-btn:hover {
    background: #1e3a5f;
}

/* "Create" in the New-Config popover - already themed with sol-* tokens */
.create-config-btn {
    background: var(--sol-panel-2, #1b2735);
    color: var(--sol-amber);
    border: 1px solid var(--sol-line);
    border-radius: var(--sol-radius, 4px);
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: border-color 0.15s, background 0.15s;
}
.create-config-btn:hover {
    border-color: var(--sol-amber);
    background: var(--sol-panel);
}

.version-input-group {
    display: flex !important;
    gap: 4px;
    align-items: center;
    width: 100%
}

.reassign-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(42, 74, 124, 0.85);
    border: none;
    color: #fff;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    z-index: 2;
}
.reassign-btn:hover { background: rgba(30, 58, 95, 0.95); }

.reassign-menu {
    position: fixed;
    top: 32px;
    right: 4px;
    background: var(--sol-panel);
    border: 1px solid var(--sol-line);
    border-radius: var(--sol-radius);
    box-shadow: 0 6px 20px rgba(0,0,0,0.5);
    z-index: 1000;
    width: max-content;
    max-width: 320px;
    max-height: 240px;
    overflow-y: auto;
}

.autocomplete-dropdown.active { display: block; }
.autocomplete-item:last-child { border-bottom: none; }
/* only the .highlighted half survives here - the :hover half of this
   selector-group in style.css was already fully shadowed (dead weight),
   see docs/style-css-migration.md for the reasoning; not carried over. */
.autocomplete-item.highlighted { background: var(--sol-amber); color: var(--sol-bg); }
.autocomplete-item.inactive { opacity: 0.6; }

.reassign-menu-item {
    padding: 8px 12px;
    font-size: 13px;
    cursor: pointer;
    color: var(--sol-ink);
    font-family: var(--font-mono);
    border-bottom: 1px solid var(--sol-line);
}
.reassign-menu-item:last-child { border-bottom: none; }
.reassign-menu-item:hover { background: var(--sol-amber); color: var(--sol-bg); }

#filterAirline {
    text-transform: uppercase;
}
#filterAirline::placeholder {
    text-transform: none;
}
#searchInput {
    text-transform: uppercase;
}
#searchInput::placeholder {
    text-transform: none;
}

.dup-airline-input {
    width: 100%;
    box-sizing: border-box;
    padding: 5px 8px;
    background: #2a2a2a;
    border: 1px solid #555;
    border-radius: 4px;
    color: #fff;
    font-family: var(--font-mono, inherit);
    font-size: 13px;
    outline: none;
}
.dup-airline-input::placeholder {
    color: #888;
}
.dup-airline-input:focus {
    border-color: var(--sol-amber, #e8a33d);
}
.dup-airline-list {
    max-height: 200px;
    overflow-y: auto;
}
/* .inline-search: wrapper for airline/c-n search fields in the popovers (New
   Config, Assign Airframe). Hangs the results list absolutely under the
   input so it appearing doesn't inflate the .action-item row and shift the
   label - same idea as #filterAirline (see .autocomplete-dropdown). */
.inline-search {
    position: relative;
}
.inline-search .dup-airline-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 2px;
    background: var(--sol-panel, #1e1e1e);
    border: 1px solid var(--sol-line, #555);
    border-radius: 4px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
    z-index: 1000;
}

.cvtd-badge {
    display: inline-block;
    margin-right: 5px;
    font-size: 12px;
    cursor: help;
    vertical-align: super;
    filter: saturate(1.6) contrast(1.2);
    color: #b8860b;
    font-weight: bold;
}
.ff-badge {
    display: inline-block;
    margin-right: 5px;
    font-size: 11px;
    cursor: help;
    vertical-align: super;
    filter: saturate(1.6) contrast(1.2);
}

/* "Reconcile Dummy" button (consolidateDummy(), lookup.js) */
.consolidate-btn {
    background: #2a4a7c;
    border: none;
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    margin-left: 8px;
    vertical-align: middle;
}
.consolidate-btn:hover { background: #1e3a5f; }

@media (max-width: 600px) {
    .aircraft-card,
    .aircraft-card-drilldown {
        flex-direction: column;
    }
    .aircraft-actions {
        min-width: 0;
        width: 100%;
    }
    .search-box {
        flex-direction: column;
    }
    .dd-steps {
        flex-wrap: wrap;
    }
    .dd-step {
        flex: 1 1 100%;
        min-width: 0;
    }
}
/* Lookup's aircraft table (2026-10-27, lookup.js lkRowHtml()): one row per aircraft,
   the same fixed grid for the search and every chip - thumb · reg · IATA ·
   type-version · airline · C/N · LN · F/F · ⋯ ; on the phone wrapped onto three lines */
/* count + chips in the results header (#resultsCount, upper case mono) */
.lk-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; }
.lk-chips { text-transform: none; letter-spacing: normal; font-weight: normal; }
.lk-chips .ci-chip { font-family: var(--font-mono); font-size: 12px; padding: 4px 10px; }
.lkt { display: flex; flex-direction: column; }
.lkt-row {
    display: grid; align-items: center; gap: 4px 10px;
    grid-template-columns: 64px 120px 44px minmax(90px, 170px) minmax(100px, 1fr) 90px 56px 84px 28px;
    grid-template-areas: "thumb reg iata ver air cn ln ff more";
    padding: 6px 0;
}
.lkt-row + .lkt-row { border-top: 1px solid var(--sol-line); }
.lkt-head {
    font-family: var(--font-mono); font-size: 10.5px; text-transform: uppercase;
    letter-spacing: 0.05em; color: var(--sol-ink-faint); padding: 2px 0;
}
.lkt-thumb { grid-area: thumb; }
.lkt-reg { grid-area: reg; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.lkt-reg .ie-field { font-family: var(--font-mono); color: var(--sol-amber); font-weight: 600; }
.lkt-iata { grid-area: iata; justify-self: start; }
.lkt-ver { grid-area: ver; justify-self: start; max-width: 100%; min-width: 0; }
.lkt-type { cursor: help; }
.lkt-air { grid-area: air; min-width: 0; display: flex; align-items: center; gap: 4px; }
.lkt-air > .ie-field { max-width: 100%; }
.lkt-cn { grid-area: cn; justify-self: start; font-family: var(--font-mono); }
.lkt-ln { grid-area: ln; justify-self: start; font-family: var(--font-mono); }
.lkt-first_flight { grid-area: ff; justify-self: start; font-family: var(--font-mono); font-size: 12px; }
.lkt-more-btn { grid-area: more; margin-left: 0; justify-self: end; padding: 2px 6px; }
.lkt-media-btn {
    background: none; border: 1px solid var(--sol-line); border-radius: var(--sol-radius);
    color: var(--sol-ink-dim); font-family: var(--font-mono); font-size: 11px;
    padding: 0 6px; line-height: 1.6; cursor: pointer;
}
.lkt-media-btn:hover, .lkt-media-btn.picked { color: var(--sol-amber); border-color: var(--sol-amber); }
.lkt-panel { grid-column: 1 / -1; padding-top: 4px; border-top: 1px dashed var(--sol-line); }
#resultsContainer .lkt-panel:not(.lkt-media) { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.lkt-newcfg { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.lkt-newcfg .version-input-inline, .lkt-newcfg .iata-select-inline { width: auto; max-width: 180px; }
.lkt-newcfg .inline-search { flex: 0 1 220px; }
.lkt-media .media-section { margin: 4px 0 0; }
.lk-typeinfo { max-width: min(440px, 92vw); max-height: 60vh; padding: 6px 8px; }
@media (max-width: 640px) {
    .lkt-head { display: none; }
    .lkt-row {
        grid-template-columns: 56px minmax(0, auto) 40px minmax(0, 1fr) 28px;
        grid-template-areas:
            "thumb reg iata ver more"
            "thumb air air air air"
            ".     cn  ln  ff  ff";
        gap: 4px 8px;
    }
    .lkt-thumb { width: 56px !important; height: 38px !important; align-self: start; }
}

/* "in the collection?" above the aircraft table (lkLoadStacks(), 2026-10-28, MT-02 R6-R8):
   a carousel (.carousel) with one tile per livery stack - photo on top, ×count, livery, years;
   ×N unfolds the stack's other photos behind it (.lk-stack-more, smaller, marked on the left) */
.lk-stacks { margin: 0 0 14px; }
.lk-stacks-head, .lk-stacks-none { font-family: var(--font-mono); font-size: 12px; color: var(--sol-ink-dim); margin-bottom: 6px; }
.lk-stacks-none { font-size: 13px; }
.lk-stacks-row { gap: 10px; }
.lk-stack { flex: 0 0 160px; min-width: 0; scroll-snap-align: start; font-family: var(--font-mono); font-size: 11.5px; }
.lk-stack-more { flex-basis: 120px; padding-left: 6px; border-left: 2px solid var(--sol-line); }
.lk-stack-more .lk-stack-img { width: 114px; height: 76px; }
.lk-stack-img { position: relative; width: 160px; height: 106px; background: var(--sol-panel-2); border-radius: var(--sol-radius); overflow: hidden; }
.lk-stack-img img { width: 100%; height: 100%; object-fit: cover; cursor: pointer; display: block; }
.lk-stack-n {
    -webkit-appearance: none; appearance: none;
    position: absolute; right: 4px; bottom: 4px;
    background: rgba(14, 22, 33, 0.85); color: var(--sol-amber);
    border: 1px solid var(--sol-amber); border-radius: var(--sol-radius);
    font: 600 12px var(--font-mono); padding: 1px 6px; cursor: pointer;
}
.lk-stack-n.picked { background: var(--sol-panel); }
.lk-stack-who, .lk-stack-liv, .lk-stack-yrs { margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lk-stack-reg { color: var(--sol-amber); }
.lk-stack-liv { color: var(--sol-ink); }
.lk-stack-yrs { color: var(--sol-ink-dim); }
@media (max-width: 700px) {
    .lk-stack { flex-basis: 130px; }
    .lk-stack-img { width: 130px; height: 86px; }
}
/* stacks by hand (R7 / R8): small text actions under a tile, ⤒ mark on a picked photo,
   join mode - the source dimmed-outlined, the stacks it can join show "+ here" */
.lk-stack-acts { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.lk-stack-act {
    -webkit-appearance: none; appearance: none;
    background: transparent; color: var(--sol-ink-dim);
    border: 1px solid var(--sol-line); border-radius: var(--sol-radius);
    font: 11px var(--font-mono); padding: 1px 6px; cursor: pointer;
}
.lk-stack-act:hover { color: var(--sol-amber); border-color: var(--sol-amber); }
.lk-join-here { display: none; }
.lk-join-to .lk-join-here { display: inline-block; color: var(--sol-amber); border-color: var(--sol-amber); }
.lk-join-to .lk-join { display: none; }
.lk-join-from .lk-join { color: var(--sol-amber); border-color: var(--sol-amber); }
.lk-joining .lk-stack:not(.lk-join-from):not(.lk-join-to) { opacity: 0.4; }
.lk-join-to .lk-stack-img { outline: 2px dashed var(--sol-amber); outline-offset: -2px; }
.lk-stack-picked {
    -webkit-appearance: none; appearance: none;
    position: absolute; left: 4px; top: 4px;
    background: rgba(14, 22, 33, 0.85); color: var(--sol-amber);
    border: 1px solid var(--sol-amber); border-radius: var(--sol-radius);
    font: 600 12px var(--font-mono); padding: 0 5px; cursor: pointer;
}
