/* ==========================================================================
   SwissCarInfo — Tools (Pneus / Comparer / Classement)
   Shared styling for the Gen6/TAS-powered tool pages.
   Reuses the .seo-page-header look from the guide pages (e.g. /champ-24).
   ========================================================================== */

/* ---- SEO page header (same look as guide pages) ---- */
.seo-page-header {
    background: linear-gradient(135deg, #1e3a5f 0%, #0f172a 100%);
    padding: 2.5rem 0;
    position: relative;
    overflow: hidden;
}
.seo-page-header::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}
.seo-breadcrumb { display: flex; align-items: center; gap: 10px; margin-bottom: 1.5rem; position: relative; flex-wrap: wrap; }
.seo-breadcrumb a { color: rgba(255,255,255,0.7); text-decoration: none; font-size: 0.9rem; transition: color 0.2s; }
.seo-breadcrumb a:hover { color: #fff; }
.seo-breadcrumb .separator { color: rgba(255,255,255,0.4); font-size: 0.75rem; }
.seo-breadcrumb .current { color: rgba(255,255,255,0.9); font-size: 0.9rem; }
.seo-hero-content { position: relative; }
.seo-hero-text h1 { color: #fff; font-size: 2.25rem; font-weight: 700; margin: 0 0 0.5rem 0; display: flex; align-items: center; gap: 1rem; }
.seo-hero-text h1 i { font-size: 1.75rem; opacity: 0.9; }
.seo-hero-text p { color: rgba(255,255,255,0.75); font-size: 1.1rem; margin: 0; }
@media (max-width: 768px) { .seo-hero-text h1 { font-size: 1.75rem; } }

/* ---- Vehicle picker widget (sci-tool-search.js) ---- */
.scits { --scits-accent: #2563eb; } /* SwissCarInfo brand blue (--sci-primary) */
.scits-modes { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.scits-mode {
    border: 1px solid #dee2e6; background: #fff; color: #334155;
    border-radius: 999px; padding: .4rem .9rem; font-size: .85rem; font-weight: 600;
    cursor: pointer; transition: all .15s; display: inline-flex; align-items: center; gap: .4rem;
}
.scits-mode:hover { border-color: var(--scits-accent, #2563eb); color: var(--scits-accent, #2563eb); }
.scits-mode.active { background: var(--scits-accent, #2563eb); border-color: var(--scits-accent, #2563eb); color: #fff; }
.scits-inputrow { display: flex; gap: .5rem; flex-wrap: wrap; }
.scits-inputrow .form-control, .scits-inputrow .form-select { flex: 1 1 auto; min-width: 0; }
.scits-hint { font-size: .8rem; color: #64748b; margin-top: .5rem; }
.scits-results { margin-top: .75rem; max-height: 360px; overflow-y: auto; border-radius: .75rem; }
.scits-result {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    padding: .65rem .9rem; border: 1px solid #eef2f7; border-radius: .6rem; margin-bottom: .4rem;
    cursor: pointer; background: #fff; transition: all .12s;
}
.scits-result:hover { border-color: var(--scits-accent, #2563eb); box-shadow: 0 2px 10px rgba(13,110,253,.08); }
.scits-result .r-main { font-weight: 600; color: #0f172a; }
.scits-result .r-sub { font-size: .8rem; color: #64748b; }
.scits-result .r-tg { font-size: .72rem; color: #94a3b8; font-family: monospace; }
.scits-badge-cat { font-size: .68rem; text-transform: uppercase; letter-spacing: .03em; }
.scits-empty, .scits-loading, .scits-error { padding: .75rem; font-size: .85rem; color: #64748b; text-align: center; }
.scits-error { color: #b91c1c; }

/* selected vehicle chip */
.scits-selected {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    padding: .65rem .9rem; border: 1px solid var(--scits-accent, #2563eb); border-radius: .6rem;
    background: #f0f7ff;
}
.scits-selected .x { cursor: pointer; color: #64748b; }
.scits-selected .x:hover { color: #b91c1c; }

/* ---- Comparison table (modern, light) ---- */
.cmp-table { table-layout: fixed; border-collapse: separate; border-spacing: 0; margin-bottom: .5rem; }
.cmp-table th, .cmp-table td { vertical-align: middle; border: 0; padding: .65rem .9rem; }
.cmp-table tbody td { border-bottom: 1px solid #f1f5f9; }
.cmp-table .cmp-label { width: 32%; color: #64748b; font-weight: 600; font-size: .86rem; }
.cmp-table .cmp-val { width: 34%; font-size: .92rem; color: #0f172a; text-align: center; }
.cmp-table tbody tr:hover td { background: #f8fafc; }
/* vehicle header row */
.cmp-table thead th { background: #fff; border-bottom: 2px solid #e5e7eb; padding: .9rem; }
.cmp-table thead .cmp-label { background: #f8fafc; }
/* section header — soft band with a coloured accent (no loud full-blue bar) */
.cmp-group th, .cmp-group td {
    background: #f1f5f9; color: #334155; font-size: .72rem; text-transform: uppercase;
    letter-spacing: .06em; font-weight: 700; padding: .5rem .9rem;
    border-top: 1px solid #e2e8f0; border-bottom: 1px solid #e2e8f0;
}
.cmp-group th::before {
    content: ''; display: inline-block; width: 3px; height: .85em; background: #2563eb;
    border-radius: 2px; margin-right: .55rem; vertical-align: -1px;
}
.cmp-group.cmp-group-calc th::before { background: #0ea5e9; }
/* winner cell + difference row */
.cmp-val.cmp-better { background: #ecfdf5; font-weight: 700; color: #047857; }
.cmp-diff .cmp-label { box-shadow: inset 3px 0 0 #93c5fd; }
.cmp-locked { color: #94a3b8; font-style: italic; text-align: center; }
.cmp-locked .bi { color: #f59e0b; font-style: normal; }
.cmp-locked:hover { background: #fff7ed; }
.cmp-unlock-btn { white-space: nowrap; }
/* comparison column header: title / variant / tg / action stacked cleanly */
.cmp-vehhead { display: flex; flex-direction: column; align-items: center; gap: .35rem; }
.cmp-vehhead-link { display: block; line-height: 1.3; }
.cmp-vehhead-title { display: block; font-weight: 700; color: #1d4ed8; }
.cmp-vehhead-variant { display: block; font-size: .8rem; color: #64748b; }
.cmp-vehhead .r-tg { display: block; font-size: .72rem; color: #94a3b8; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.cmp-vehhead-badge { font-weight: 600; }
#cmpUnlockModal .modal-header { background: linear-gradient(135deg, #1e3a5f 0%, #0f172a 100%); color: #fff; }
#cmpUnlockModal .modal-header .btn-close { filter: invert(1) grayscale(100%) brightness(200%); }

/* ---- Leaderboard (Classement) ---- */
/* category tabs as a tidy segmented control */
.rank-tabs { gap: .4rem; border: 0; flex-wrap: wrap; }
.rank-tabs .nav-item { margin: 0; }
.rank-tabs .nav-link {
    border-radius: 999px; font-weight: 600; font-size: .9rem; padding: .4rem 1.1rem;
    color: #334155; background: #f1f5f9; border: 1px solid transparent; transition: all .15s;
}
.rank-tabs .nav-link:hover { background: #e2e8f0; }
.rank-tabs .nav-link.active { background: var(--scits-accent, #2563eb); color: #fff; }
/* criteria toolbar — keeps the (now numerous) sort pills in one tidy panel */
.rank-crit-bar {
    display: flex; align-items: center; flex-wrap: wrap; gap: .45rem .75rem;
    background: #f8fafc; border: 1px solid #eef2f7; border-radius: .9rem; padding: .7rem .85rem;
}
.rank-crit-label {
    flex: 0 0 auto; font-size: .72rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .04em; color: #94a3b8;
}
.rank-crits { display: flex; flex-wrap: wrap; gap: .4rem; }
.rank-crits .scits-mode { font-size: .8rem; padding: .3rem .8rem; }
.rank-list { counter-reset: rank; }
.rank-row {
    display: flex; align-items: center; gap: .9rem; padding: .6rem .8rem;
    border-bottom: 1px solid #eef2f7;
}
.rank-row:hover { background: #f8fafc; }
.rank-pos {
    flex: 0 0 2.2rem; height: 2.2rem; width: 2.2rem; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; background: #e2e8f0; color: #475569; font-size: .9rem;
}
.rank-row:nth-child(1) .rank-pos { background: #fde68a; color: #92400e; }
.rank-row:nth-child(2) .rank-pos { background: #e5e7eb; color: #374151; }
.rank-row:nth-child(3) .rank-pos { background: #fdba74; color: #7c2d12; }
.rank-main { flex: 1 1 auto; min-width: 0; }
.rank-main .rm-title { font-weight: 600; color: #0f172a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-main .rm-sub { font-size: .78rem; color: #64748b; }
.rank-val { flex: 0 0 auto; font-weight: 700; color: var(--scits-accent, #2563eb); white-space: nowrap; }
.rank-val small { color: #94a3b8; font-weight: 500; }

/* tyre result block (Pneus) */
.tyre-block { white-space: pre-wrap; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85rem; line-height: 1.5; }
.tyre-locked { position: relative; }
.tyre-locked .tyre-blur { filter: blur(5px); user-select: none; pointer-events: none; }

/* decoded tyre/rim spec cards (parsed from chTyreRims) */
.tyre-cfgs { display: flex; flex-direction: column; gap: 1rem; }
.tyre-cfg { border: 1px solid #e2e8f0; border-radius: .9rem; overflow: hidden; }
.tyre-cfg-head { padding: .55rem 1rem; font-weight: 700; font-size: .85rem; color: #334155; background: #f8fafc; border-bottom: 1px solid #eef2f7; }
.tyre-cfg:first-child .tyre-cfg-head { color: #1e40af; background: #eff6ff; }
.tyre-cfg-body { padding: .25rem 1rem; }
.tyre-row { display: flex; gap: .9rem; padding: .9rem 0; align-items: flex-start; }
.tyre-row + .tyre-row { border-top: 1px solid #f1f5f9; }
.tyre-row-icon {
    flex: 0 0 auto; width: 2.6rem; height: 2.6rem; border-radius: 50%;
    border: 2px solid #e2e8f0; display: flex; align-items: center; justify-content: center;
    color: #94a3b8; font-size: 1.1rem; margin-top: .15rem;
}
.tyre-row-main { flex: 1 1 auto; min-width: 0; }
.tyre-row-title { font-size: 1.05rem; font-weight: 700; color: #0f172a; margin-bottom: .35rem; }
.tyre-axle {
    font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em;
    background: #eef2ff; color: #3730a3; border-radius: .4rem; padding: .05rem .4rem; margin-left: .4rem; vertical-align: middle;
}
.tyre-specs { display: grid; grid-template-columns: 1fr 1fr; column-gap: 2.5rem; }
.tyre-specs .ts { display: flex; justify-content: space-between; gap: 1rem; padding: .25rem 0; border-bottom: 1px solid #f1f5f9; }
.ts-k { color: #64748b; font-size: .85rem; }
.ts-v { color: #0f172a; font-weight: 600; font-size: .85rem; text-align: right; white-space: nowrap; }
.tyre-badges { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .6rem; }
.tb { font-size: .72rem; font-weight: 700; border-radius: .5rem; padding: .15rem .55rem; }
.tb-load { background: #eff6ff; color: #1d4ed8; }
.tb-speed { background: #fff7ed; color: #c2410c; }
.tb-ms { background: #f1f5f9; color: #475569; }
.tyre-alt { font-size: .8rem; color: #64748b; margin-top: .5rem; }
.tyre-note { font-size: .8rem; color: #94a3b8; padding: .35rem 0; }
.tyre-row-raw { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85rem; color: #475569; white-space: pre-wrap; }
@media (max-width: 575px) { .tyre-specs { grid-template-columns: 1fr; column-gap: 0; } }

/* ---- Shared tool sidebar (harmonised with guide pages) ---- */
.tools-aside { position: sticky; top: 1.5rem; }
.tools-card { background: #f8fafc; border: 1px solid #eef2f7; border-radius: 1rem; padding: 1.25rem; }
.tools-search-card { background: linear-gradient(135deg, #eff6ff 0%, #e0ecff 100%); border-color: #cfe0ff; }
.tools-link { color: #334155; font-weight: 500; display: inline-flex; align-items: center; transition: color .15s; }
.tools-link i { color: var(--scits-accent, #2563eb); }
.tools-link:hover { color: var(--scits-accent, #2563eb); }
@media (max-width: 991px) { .tools-aside { position: static; margin-top: 1rem; } }

/* picker: Wechselschild / multi-result note */
.scits-note {
    font-size: .8rem; color: #92400e; background: #fffbeb; border: 1px solid #fde68a;
    border-radius: .5rem; padding: .5rem .65rem; margin-bottom: .5rem;
}
/* plate-type picker option (Wechselschild / multi-type plates) */
.scits-ptype .r-info { display: flex; flex-direction: column; align-items: flex-start; gap: .1rem; }
.scits-wbadge {
    display: inline-block; font-size: .6rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em;
    background: linear-gradient(135deg, #f59e0b, #f97316); color: #fff; border-radius: .35rem; padding: .05rem .4rem; margin-bottom: .15rem;
}
.scits-result.scits-disabled { cursor: default; opacity: .65; background: #f8fafc; }
.scits-result.scits-disabled:hover { border-color: #eef2f7; box-shadow: none; }
/* Wechselschild make-entry verification form (OFROU data protection) */
.scits-wsform { padding: .25rem 0; }
.scits-wsfield { margin-bottom: .6rem; }
.scits-wslabel { font-size: .82rem; font-weight: 600; color: #334155; display: block; margin-bottom: .25rem; }
.scits-acwrap { position: relative; }
.scits-acdd {
    position: absolute; top: 100%; left: 0; right: 0; z-index: 1050; background: #fff;
    border: 1px solid #d1d5db; border-top: none; border-radius: 0 0 .5rem .5rem;
    max-height: 200px; overflow-y: auto; box-shadow: 0 4px 12px rgba(0,0,0,.1);
}
.scits-acitem { padding: .45rem .7rem; font-size: .85rem; cursor: pointer; }
.scits-acitem:hover { background: #eff6ff; color: #1e40af; }
.scits-wserr { font-size: .82rem; color: #b91c1c; margin: .25rem 0 .5rem; }
/* show the plate / context on a result's sub line */
.scits-result .r-sub .bi { color: #94a3b8; }

/* ---- Leaderboard row polish: title and sub on their own lines ---- */
.rank-main .rm-title { display: block; }
.rank-main .rm-sub { display: block; margin-top: .1rem; }
.rank-val { font-size: 1.05rem; text-align: right; }
.rank-val .rk-cap { color: #f59e0b; font-weight: 700; }
.rank-foot { font-size: .75rem; color: #94a3b8; margin-top: .75rem; padding: 0 .8rem; }

/* ---- Comparer polish ---- */
.cmp-table thead .cmp-val { vertical-align: top; }
.cmp-locked { cursor: pointer; }
.cmp-locked:hover { background: #fef3c7; }
/* derived/computed metrics: accent only (full band handled in the comparison-table block) */
.cmp-toggle {
    display: inline-flex; align-items: center; gap: .5rem; background: #f1f5f9;
    border: 1px solid #e2e8f0; border-radius: 999px; padding: .35rem .85rem; margin-bottom: .75rem;
}
.cmp-toggle .form-check-input { margin: 0; cursor: pointer; }
.cmp-toggle .form-check-label { font-size: .82rem; font-weight: 600; color: #334155; cursor: pointer; }
