/* LW Rail Fleet Explorer — Lane A (Signal Black).
 *
 * The card grid, chips, codes, skeleton, empty states and pager come from the
 * design system (rail.css: .el-card / .el-chip / .el-code / .el-grid / .skel /
 * .state / .pager). This file only scopes the plugin's own root and the pieces
 * the design system does not cover (hero, live-search control, typeahead,
 * thumbnail). Every value is a site token — no raw hex.
 */

.lwveh-fleet {
    max-width: var(--container, 1220px);
    margin: 0 auto;
    padding: 0 1rem 2.5rem;
    color: var(--fg);
}

/* Hero --------------------------------------------------------------------- */

.lwveh-fleet-hero {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-2);
    padding: 1.25rem 1.35rem 1.35rem;
    margin: 0 auto 1.25rem;
    max-width: 960px;
}

.lwveh-fleet-hero-inner { margin: 0 0 0.85rem; }
.lwveh-fleet-kicker { margin: 0 0 0.15rem; color: var(--accent); }
.lwveh-fleet-title { font-family: var(--font-display); font-size: 1.4rem; font-weight: 700; line-height: 1.2; margin: 0; color: var(--fg); }
.lwveh-fleet-lead { font-size: 0.88rem; color: var(--muted); margin: 0.25rem 0 0; line-height: 1.5; }

.lwveh-fleet-verify {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0.7rem 0 0;
    padding: 0.28rem 0.8rem;
    background: var(--ok-soft);
    border: 1px solid color-mix(in oklch, var(--ok) 34%, transparent);
    border-radius: var(--radius-pill);
    font-size: 0.76rem;
    color: var(--fg);
    line-height: 1.3;
}
.lwveh-fleet-verify strong { font-weight: 700; }
.lwveh-verify-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--ok);
    flex: 0 0 auto;
    box-shadow: 0 0 0 3px var(--ok-soft);
}

/* Live-search control (scoped; the fleet explorer keeps its own typeahead) -- */

.lwveh-fleet-form { display: flex; gap: 0.45rem; align-items: stretch; margin: 0; }
.lwveh-fleet-search-group { position: relative; flex: 1 1 auto; }
.lwveh-fleet-q {
    width: 100%;
    padding: 0.6rem 2.4rem 0.6rem 2.2rem;
    font: inherit;
    font-size: 0.92rem;
    line-height: 1.4;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-2);
    color: var(--fg);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.lwveh-fleet-q::placeholder { color: var(--muted); }
.lwveh-fleet-q:focus { outline: none; border-color: var(--accent); background: var(--surface); box-shadow: var(--glow); }
.lwveh-fleet-q::-webkit-search-cancel-button,
.lwveh-fleet-q::-webkit-search-decoration { -webkit-appearance: none; appearance: none; }
.lwveh-search-icon { position: absolute; left: 0.7rem; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; line-height: 1; }
.lwveh-fleet-clear {
    appearance: none;
    position: absolute;
    right: 0.35rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1.4rem;
    height: 1.4rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}
.lwveh-fleet-clear:hover { background: var(--fg-soft); color: var(--fg); }

/* Typeahead suggestions ----------------------------------------------------- */

.lwveh-fleet-suggest {
    position: absolute;
    top: calc(100% + 0.4rem);
    left: 0;
    right: 0;
    z-index: 50;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-2);
    overflow: hidden;
    overflow-y: auto;
    max-height: 24rem;
    animation: lwveh-sg-in 0.14s ease-out;
}
@keyframes lwveh-sg-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.lwveh-sg-group {
    padding: 0.5rem 0.9rem 0.25rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
}
.lwveh-sg-item { display: flex; align-items: baseline; gap: 0.5rem; padding: 0.5rem 0.9rem; cursor: pointer; transition: background 0.1s ease-out; }
.lwveh-sg-item:hover, .lwveh-sg-item.active { background: var(--fg-soft); }
.lwveh-sg-label { font-weight: 600; font-size: 0.9rem; color: var(--fg); white-space: nowrap; }
.lwveh-sg-sub { flex: 1; font-size: 0.78rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lwveh-sg-flag { font-size: 0.85rem; }
.lwveh-sg-empty { padding: 0.8rem 0.9rem; font-size: 0.85rem; color: var(--muted); }

/* Card thumbnail (the only piece .el-card does not define) ------------------ */

.lwveh-thumb {
    display: block;
    aspect-ratio: 16 / 10;
    width: 100%;
    overflow: hidden;
    background: var(--surface-2);
    position: relative;
}
.lwveh-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.el-card:hover .lwveh-thumb img { transform: scale(1.04); }
.lwveh-thumb--ph { background: linear-gradient(135deg, var(--surface-2), var(--surface)); }

/* Meta + active filters ----------------------------------------------------- */

.lwveh-fleet-meta { max-width: 960px; margin: 0.75rem auto 1rem; text-align: center; }
.lwveh-fleet-active-filters { max-width: 960px; margin: 0.75rem auto 0; min-height: 1.5rem; }
.lwveh-filter-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; }
.lwveh-filter-chip { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.35rem 0.75rem 0.35rem 0.5rem; font-size: 0.8rem; border-radius: var(--radius-pill); background: var(--surface-2); border: 1px solid var(--border); color: var(--fg); }
.lwveh-filter-chip-close { appearance: none; border: none; background: none; color: inherit; font-size: 1rem; line-height: 1; padding: 0 0.15rem; cursor: pointer; opacity: 0.7; transition: opacity 0.2s ease; }
.lwveh-filter-chip-close:hover { opacity: 1; }

/* Pager spacing (behaviour from .pager) ------------------------------------ */

.lwveh-fleet-pager { padding: 2rem 0 0; }

.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@media (prefers-reduced-motion: reduce) {
    .lwveh-thumb img, .lwveh-fleet-suggest { transition: none !important; animation: none !important; }
}

@media (max-width: 640px) {
    .lwveh-fleet-hero { padding: 1rem; margin-bottom: 1rem; }
    .lwveh-fleet-title { font-size: 1.2rem; }
    .lwveh-fleet-q { font-size: 0.95rem; }
}
