/* ── Araç karşılaştırma ────────────────────────────────────────────────
   İki parça var: kartlardaki "Karşılaştır" kutucuğu seçildikçe dolan alt
   şerit (tray) ve şeritteki düğmeye basılınca açılan karşılaştırma
   penceresi. Şerit sayfanın üstünde sabit durur, liste arkada olduğu gibi
   kalır; pencere de aynı mantıkla listenin üstünde açılır.
   Betiği: wwwroot/js/vehicle-compare.js */

/* ── Karttaki kutucuk ─────────────────────────────────────────────── */
.vc-check {
    display: flex; align-items: center; gap: 8px;
    padding: 7px 10px;
    border: 1px solid var(--oa-line-2); border-radius: var(--oa-r-sm);
    background: #fcfcfd;
    color: var(--oa-ink-2); font-size: 12px; font-weight: 700;
    cursor: pointer; user-select: none;
    transition: border-color .2s ease, color .2s ease, background .2s ease;
}
.vc-check:hover { border-color: var(--oa-brand-line); color: var(--oa-brand); }
.vc-check input { width: 16px; height: 16px; flex: 0 0 auto; accent-color: var(--oa-brand); cursor: pointer; }
.vc-check .material-symbols-outlined { font-size: 17px; color: var(--oa-brand); opacity: .85; }
.vc-check__text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Üç araç doluyken kalan kutucuklar seçilemez: sönük durur ve imleç
   "yapılamaz" işaretine döner, başlığında sebebi yazar. */
.vc-check.is-disabled { opacity: .5; cursor: not-allowed; }
.vc-check.is-disabled input { cursor: not-allowed; }
.vc-check.is-active { border-color: var(--oa-brand); color: var(--oa-brand); background: var(--oa-brand-soft); }
/* Kart görünümünde kutucuk düğmelerin hemen üstünde, satır görünümünde
   krokinin altında durur; ikisinde de satırın tamamını kaplar. */
.auction-card .vc-check { margin: 8px 0 0; justify-content: center; }
.al-side .vc-check { justify-content: center; }

/* ── Alt şerit ────────────────────────────────────────────────────── */
.vc-tray {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 1250;
    padding: 12px var(--container-gutter) calc(12px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--oa-line);
    background: rgba(255,255,255,.97);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 -10px 30px rgba(20,24,31,.12);
    animation: vc-tray-in .25s var(--oa-ease, ease);
}
.vc-tray[hidden] { display: none; }
/* Şerit açıkken sayfanın sonu (sayfalama çubuğu, alt bilgi) şeridin
   altında kalmasın. */
body.vc-has-tray { padding-bottom: 88px; }
@keyframes vc-tray-in { from { transform: translateY(100%); } to { transform: translateY(0); } }
.vc-tray__inner {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    width: min(calc(100% - 2 * var(--container-gutter)), var(--container-wide));
    margin: 0 auto;
}
.vc-tray__slots { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1 1 auto; overflow-x: auto; padding: 3px; }
.vc-slot {
    position: relative; flex: 0 0 auto;
    width: 76px; height: 58px;
    border: 1px solid var(--oa-line-2); border-radius: var(--oa-r-sm); overflow: hidden;
    background: var(--oa-surface-3);
}
.vc-slot img { display: block; width: 100%; height: 100%; object-fit: cover; }
.vc-slot__empty {
    display: grid; width: 74px; height: 56px; flex: 0 0 auto; place-items: center;
    border: 1px dashed var(--oa-line); border-radius: var(--oa-r-sm);
    color: var(--oa-faint); background: transparent;
}
.vc-slot__empty .material-symbols-outlined { font-size: 20px; }
.vc-slot__fallback { display: grid; width: 100%; height: 100%; place-items: center; color: var(--oa-faint); }
.vc-slot__remove {
    position: absolute; top: 2px; right: 2px;
    display: grid; width: 20px; height: 20px; place-items: center;
    border: 0; border-radius: 50%;
    color: #fff; background: var(--oa-danger, #e65050);
    box-shadow: 0 2px 6px rgba(20,24,31,.3);
    cursor: pointer;
}
.vc-slot__remove .material-symbols-outlined { font-size: 15px; }
.vc-tray__tools { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.vc-tray__hint { color: var(--oa-faint); font-size: 12px; font-weight: 600; }
.vc-tray__clear {
    height: 38px; padding: 0 12px;
    border: 1px solid var(--oa-line); border-radius: var(--oa-r-sm);
    color: var(--oa-ink-2); background: #fff; font-size: 13px; font-weight: 700;
    cursor: pointer; transition: border-color .2s ease, color .2s ease;
}
.vc-tray__clear:hover { border-color: var(--oa-brand); color: var(--oa-brand); }
.vc-tray__cta {
    display: inline-flex; align-items: center; gap: 7px;
    height: 38px; padding: 0 16px;
    border: 0; border-radius: var(--oa-r-sm);
    color: #fff; background: var(--oa-brand); font-size: 13px; font-weight: 800;
    cursor: pointer; transition: background .2s ease, box-shadow .2s ease, opacity .2s ease;
}
.vc-tray__cta:hover { background: var(--oa-brand-strong); box-shadow: 0 6px 18px var(--oa-brand-glow); }
.vc-tray__cta[disabled] { opacity: .45; cursor: not-allowed; box-shadow: none; }
.vc-tray__cta .material-symbols-outlined { font-size: 18px; }
/* Sınır uyarısı şeridin üstünde bir an belirir; kendi kendine kapanır. */
.vc-tray__toast {
    position: absolute; left: 50%; bottom: calc(100% + 10px);
    padding: 8px 12px; border-radius: 999px;
    color: #fff; background: #17223b; font-size: 12px; font-weight: 700;
    transform: translateX(-50%);
    box-shadow: 0 10px 24px -12px rgba(12,25,47,.8);
}
.vc-tray__toast[hidden] { display: none; }
@media (max-width: 639px) {
    .vc-tray__inner { gap: 10px; }
    .vc-tray__clear { display: none; }
    .vc-slot, .vc-slot__empty { width: 58px; height: 46px; }
    .vc-tray__cta { padding: 0 12px; }
}

/* ── Karşılaştırma penceresi ──────────────────────────────────────── */
/* Ölçüler pencerenin kökünde durur: hem çerçeve genişliği hem tablo
   aynı değerlerden hesaplanır (--vc-cols'u betik yazar). */
.vc-modal {
    --vc-label: 236px;
    --vc-col: 304px;
    position: fixed; inset: 0; z-index: 1400;
    display: flex; align-items: center; justify-content: center; padding: 22px;
}
.vc-modal[hidden] { display: none; }
.vc-modal__backdrop { position: absolute; inset: 0; background: rgba(15,18,24,.62); backdrop-filter: blur(2px); }
/* Çerçeve seçilen araç sayısına göre daralır: iki araçta sütunlar
   gereksiz yere genişleyip fotoğrafla yazıyı birbirinden uzaklaştırmaz. */
.vc-modal__panel {
    position: relative; z-index: 1; display: flex; flex-direction: column;
    width: min(calc(var(--vc-label) + var(--vc-cols, 3) * var(--vc-col)), 1180px, 100%);
    height: min(92vh, 100%);
    border-radius: 20px; background: #fff; overflow: hidden;
    box-shadow: 0 26px 74px rgba(16,20,28,.3);
}
.vc-modal__head {
    display: flex; align-items: center; gap: 14px;
    padding: 18px 26px; border-bottom: 1px solid var(--oa-line);
    background: var(--oa-surface);
}
.vc-modal__title {
    flex: 1 1 auto; min-width: 0; margin: 0;
    font-family: "Hanken Grotesk", sans-serif; font-size: 18px; font-weight: 600; color: var(--oa-muted);
    letter-spacing: -.02em;
}
.vc-modal__title strong { color: var(--oa-brand); font-weight: 800; }
.vc-modal__share {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    flex: 0 0 auto; min-height: 34px; padding: 6px 12px;
    border: 1px solid var(--oa-line); border-radius: var(--oa-r-sm);
    background: #fff; color: var(--oa-brand); font-size: 13px; font-weight: 700;
    cursor: pointer; transition: border-color .2s ease;
}
.vc-modal__share:hover { border-color: var(--oa-brand); }
.vc-modal__share:focus-visible { outline: 2px solid var(--oa-brand); outline-offset: 2px; }
.vc-modal__share:disabled { opacity: .6; cursor: wait; }
.vc-modal__share .material-symbols-outlined { font-size: 19px; }
.vc-modal__share-status {
    margin: 0; padding: 10px 22px; border-bottom: 1px solid var(--oa-line);
    color: var(--oa-ink-2); background: var(--oa-surface); font-size: 12px;
}
@media (max-width: 479px) {
    .vc-modal__share { padding: 6px 8px; }
    .vc-modal__share > span:last-child { display: none; }
}
.vc-modal__close {
    display: grid; width: 34px; height: 34px; flex: 0 0 auto; place-items: center;
    border: 1px solid var(--oa-line); border-radius: var(--oa-r-sm);
    color: var(--oa-ink-2); background: #fff; cursor: pointer;
    transition: border-color .2s ease, color .2s ease;
}
.vc-modal__close:hover { border-color: var(--oa-brand); color: var(--oa-brand); }
.vc-modal__close .material-symbols-outlined { font-size: 19px; }
.vc-modal__body { flex: 1 1 auto; min-height: 0; overflow: auto; background: #fff; }

/* Tek bir ızgara: solda etiket sütunu, sağda araç sütunları. Satır
   başlıkları yatay kaydırmada solda sabit kalır, araç başlıkları da
   dikey kaydırmada üstte. */
.vc-table {
    display: grid;
    grid-template-columns: var(--vc-label) repeat(var(--vc-cols, 2), minmax(0, 1fr));
    min-width: calc(var(--vc-label) + var(--vc-cols, 2) * 236px);
    align-items: stretch;
    padding-bottom: 14px;
}
/* Satırlar nefes alsın: değer hücreleri etiket sütunundan belirgin bir
   boşlukla başlar, ayırıcı çizgiler ince kalır. */
.vc-cell {
    padding: 15px 26px;
    border-bottom: 1px solid var(--oa-line-2);
    font-size: 13px; line-height: 1.55; color: var(--oa-ink); min-width: 0;
    overflow-wrap: anywhere;
}
/* Araç sütunlarını ayıran saç teli çizgi: fotoğraf, ad ve değerler aynı
   sol hizada başladığı için sütunun nerede bittiği de belli olsun. */
.vc-cell--value + .vc-cell--value { border-left: 1px solid var(--oa-line-2); }
/* Etiket sütunu gözle takip edilsin diye çok hafif bir zemin taşır; yatay
   kaydırmada değerlerin üstünü örtmesi için de zemin şart. */
.vc-cell--label {
    position: sticky; left: 0; z-index: 1;
    background: #fbfbfc;
    border-right: 1px solid var(--oa-line-2);
    color: var(--oa-ink-2); font-size: 12px; font-weight: 700;
}
.vc-cell--empty { color: var(--oa-faint); }

/* Bölüm başlığı: üstündeki satırdan geniş bir boşlukla ayrılır, altına
   ince bir çizgi çeker. Çizgi tablonun tamamını kaplar. */
.vc-section {
    grid-column: 1 / -1;
    position: sticky; left: 0;
    margin-top: 18px;
    padding: 22px 26px 11px;
    border-bottom: 1px solid var(--oa-line-2);
    color: var(--oa-brand); font-size: 11px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase;
    background: #fff;
}

/* Araç başlığı: fotoğraf, fiyat ve ad. Pencerede yukarı kaydırılsa da
   hangi sütunun hangi araç olduğu görünür kalsın diye yapışkan. */
/* Başlık hücresi de satırlar gibi soldan hizalı: fotoğraf, araç adı ve
   altındaki bütün değerler aynı dikey çizgiden başlar. */
.vc-head {
    position: sticky; top: 0; z-index: 2;
    padding: 22px 26px 24px; border-bottom: 1px solid var(--oa-line);
    background: #fff; text-align: left;
}
/* Sol üst hücre etiket sütununun zeminini sürdürür; ikon ve kısa özet,
   boş alanı araç sütunlarıyla dengeli bir karşılaştırma başlangıcına çevirir. */
.vc-head--label { left: 0; z-index: 3; border-right: 1px solid var(--oa-line-2); background: #fbfbfc; }
.vc-head__summary {
    display: grid;
    justify-items: start;
    gap: 6px;
    min-height: 168px;
    align-content: center;
    text-align: left;
}
.vc-head__summary-icon {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 1px solid color-mix(in srgb, var(--oa-brand) 22%, transparent);
    border-radius: 14px;
    color: var(--oa-brand);
    background: color-mix(in srgb, var(--oa-brand) 8%, #fff);
}
.vc-head__summary-icon .material-symbols-outlined { font-size: 23px; }
.vc-head__summary-title {
    color: var(--oa-ink);
    font-family: "Hanken Grotesk", sans-serif;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: -.02em;
}
.vc-head__summary-copy { color: var(--oa-muted); font-size: 11px; font-weight: 600; }
/* Fotoğraf sola yaslanır ve sabit bir genişlikte durur: iki araçta da üç
   araçta da aynı boyda çıkar, altındaki yazıyla aynı hizada başlar. */
.vc-head__media {
    position: relative;
    display: block; width: min(100%, 212px); aspect-ratio: 4 / 3;
    margin: 0 0 14px;
    border: 1px solid var(--oa-line-2);
    border-radius: var(--oa-r-md); overflow: hidden; background: var(--oa-surface-3);
}
.vc-head__media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.vc-head__media .material-symbols-outlined { position: absolute; inset: 0; display: grid; place-items: center; color: #b4b8c4; }
/* Başlıkta fiyat yok: araç kimliği var. Marka/model bir satır, model
   uzantısı altında ince bir satır; ikisi birden detaya götürür. */
.vc-head__identity { display: block; color: inherit; }
.vc-head__identity:hover .vc-head__name { color: var(--oa-brand); text-decoration: underline; }
.vc-head__name {
    display: block;
    font-family: "Hanken Grotesk", sans-serif; font-size: 15px; font-weight: 700; line-height: 1.3;
    color: var(--oa-ink); letter-spacing: -.02em;
    transition: color .2s ease;
}
.vc-head__version { display: block; margin-top: 4px; font-size: 12px; font-weight: 500; line-height: 1.45; color: var(--oa-muted); }
.vc-head__remove {
    position: absolute; top: 6px; right: 6px; z-index: 1;
    display: grid; width: 24px; height: 24px; place-items: center;
    border: 0; border-radius: 50%;
    color: #fff; background: rgba(23,24,30,.72); cursor: pointer;
    transition: background .2s ease;
}
.vc-head__remove:hover { background: var(--oa-danger, #e65050); }
.vc-head__remove .material-symbols-outlined { font-size: 16px; }

/* Hasar rozetleri: krokideki renk dilini kullanır. */
.vc-damage { display: flex; flex-wrap: wrap; gap: 6px; }
.vc-damage span {
    display: inline-flex; align-items: center;
    padding: 3px 10px; border-radius: 999px;
    font-size: 12px; font-weight: 700; line-height: 1.5;
}
.vc-damage--paint span { color: #28753a; background: #e1f7e6; }
.vc-damage--local span { color: #675a00; background: #fff7bf; }
.vc-damage--changed span { color: #1975b6; background: #e1f2fd; }
.vc-damage--chassis span { color: #bd2929; background: #ffe6e6; }
.vc-flag { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; }
.vc-flag--yes { color: #bd2929; }
.vc-flag--no { color: #28753a; }
.vc-flag .material-symbols-outlined { font-size: 16px; }
.vc-yes { color: #28753a; }
.vc-yes .material-symbols-outlined { font-size: 18px; }
.vc-no { color: var(--oa-faint); }
.vc-note { display: block; font-size: 12.5px; line-height: 1.6; color: var(--oa-muted); }

/* Ekipman listesi uzayabilir: ilk satırlar görünür, gerisi düğmeyle açılır. */
.vc-more {
    grid-column: 1 / -1; position: sticky; left: 0;
    display: flex; align-items: center; justify-content: center; gap: 5px;
    padding: 10px; border: 0; border-bottom: 1px solid var(--oa-line-2);
    color: var(--oa-brand); background: #fff; font-size: 12px; font-weight: 800; cursor: pointer;
}
.vc-more .material-symbols-outlined { font-size: 17px; }
.vc-table.is-collapsed .vc-row--extra { display: none; }

@media (max-width: 1023px) {
    .vc-modal { padding: 0; }
    .vc-modal__panel { width: 100%; height: 100%; border-radius: 0; }
    .vc-modal__head { padding: 13px 16px; }
    .vc-modal__title { font-size: 16px; }
    .vc-modal { --vc-label: 148px; }
    .vc-table { min-width: calc(var(--vc-label) + var(--vc-cols, 2) * 186px); }
    .vc-cell { padding: 12px 16px; font-size: 12px; }
    .vc-section { padding: 18px 16px 9px; margin-top: 12px; }
    .vc-head { padding: 14px 16px 16px; }
    .vc-head__summary { min-height: 130px; gap: 5px; }
    .vc-head__summary-icon { width: 36px; height: 36px; border-radius: 12px; }
    .vc-head__summary-icon .material-symbols-outlined { font-size: 20px; }
    .vc-head__media { width: min(100%, 148px); margin-bottom: 10px; }
    .vc-head__name { font-size: 14px; }
}
