/* =========================================================
   KAPORTA KROKİSİ — açılımlı araç diyagramı (sol yan · üst · sağ yan)
   B = Boyalı · LB = Lokal Boyalı · D = Değişen
   Hem araç detay sayfası hem admin editörü tarafından kullanılır.
   ========================================================= */
:root {
    --krx-body: #e9ebef;
    --krx-body-line: #c9ced6;
    --krx-glass: #dde1e7;
    --krx-original: #ffffff;
    --krx-original-line: #c3c9d1;
    --krx-local: #f0e8bf;
    --krx-local-line: #ecd24a;
    --krx-local-badge: #f3c912;
    --krx-painted: #d2e7d8;
    --krx-painted-line: #7dbd8e;
    --krx-painted-badge: #3a9d55;
    --krx-changed: #cde1f3;
    --krx-changed-line: #6db0e4;
    --krx-changed-badge: #2991e0;
}

.krx {
    display: block;
    width: 100%;
    height: auto;
    max-width: 560px;
    margin: 0 auto;
    overflow: visible;
    font-family: "Manrope", "Inter", system-ui, sans-serif;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.krx-caption {
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .18em;
    fill: #9aa1ab;
    text-anchor: middle;
}

.krx-body {
    fill: var(--krx-body);
    stroke: var(--krx-body-line);
    stroke-width: 1.4;
    stroke-linejoin: round;
}

.krx-glass {
    fill: var(--krx-glass);
    stroke: var(--krx-body-line);
    stroke-width: 1.2;
    stroke-linejoin: round;
}

.krx-crease {
    fill: none;
    stroke: rgba(0, 0, 0, .06);
    stroke-width: 7;
    stroke-linecap: round;
    pointer-events: none;
}

.krx-part {
    fill: var(--krx-original);
    stroke: var(--krx-original-line);
    stroke-width: 1.5;
    stroke-linejoin: round;
    transition: fill .25s ease, stroke .25s ease, stroke-width .2s ease, opacity .25s ease;
    outline: none;
}

.krx-part.krx-local { fill: var(--krx-local); stroke: var(--krx-local-line); }
.krx-part.krx-painted { fill: var(--krx-painted); stroke: var(--krx-painted-line); }
.krx-part.krx-changed { fill: var(--krx-changed); stroke: var(--krx-changed-line); }

.krx-part:hover,
.krx-part.is-hover { stroke-width: 2.6; }
.krx-part.krx-original:hover,
.krx-part.krx-original.is-hover { fill: #f4f6f9; stroke: #9aa3ae; }

.krx.has-focus .krx-part:not(.is-hover) { opacity: .45; }
.krx.has-focus .krx-badge:not(.is-hover) { opacity: .35; }

.krx--interactive .krx-part { cursor: pointer; }
.krx--interactive .krx-part:focus-visible { stroke: #111; stroke-width: 2.6; }

/* Rozetler */
.krx-badge { pointer-events: none; transition: opacity .25s ease; }
.krx-badge circle {
    stroke: #fff;
    stroke-width: 2.2;
    filter: drop-shadow(0 1.5px 2px rgba(15, 23, 42, .22));
}
.krx-badge__in { transform-box: fill-box; transform-origin: center; }
.krx-badge text {
    font-size: 10px;
    font-weight: 800;
    fill: #fff;
    text-anchor: middle;
    dominant-baseline: central;
    letter-spacing: -.02em;
}
.krx-badge--original { display: none; }
.krx-badge--local circle { fill: var(--krx-local-badge); }
.krx-badge--local text { fill: #1f1f1f; font-size: 8.6px; }
.krx-badge--painted circle { fill: var(--krx-painted-badge); }
.krx-badge--changed circle { fill: var(--krx-changed-badge); }
.krx-badge.is-pop .krx-badge__in { animation: krxPop .45s cubic-bezier(.2, 1.6, .4, 1); }

@keyframes krxPop {
    0% { transform: scale(.4); }
    100% { transform: scale(1); }
}

/* Açılış animasyonu (detay sayfası) */
.krx-animate:not(.is-visible) .krx-part,
.krx-animate:not(.is-visible) .krx-badge__in { opacity: 0; }
.krx-animate.is-visible .krx-part { animation: krxFade .6s ease backwards; }
.krx-animate.is-visible .krx-badge__in { animation: krxBadgeIn .5s cubic-bezier(.2, 1.4, .4, 1) backwards; animation-delay: .55s; }
.krx-animate.is-visible .krx-side--right .krx-part { animation-delay: .12s; }
.krx-animate.is-visible .krx-top .krx-part { animation-delay: .06s; }

@keyframes krxFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes krxBadgeIn { from { opacity: 0; transform: scale(.3); } to { opacity: 1; transform: scale(1); } }

/* Lejant */
.krx-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px 18px;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: .82rem;
    font-weight: 600;
    color: #4b5563;
}
.krx-legend li { display: inline-flex; align-items: center; gap: 8px; }
.krx-chip {
    display: inline-grid;
    place-items: center;
    min-width: 24px;
    height: 24px;
    padding: 0 5px;
    border-radius: 999px;
    border: 2px solid #fff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .2);
    font-size: .68rem;
    font-weight: 800;
    line-height: 1;
    color: #fff;
}
.krx-chip--original { background: #fff; border-color: #c3c9d1; box-shadow: none; color: #9aa1ab; }
.krx-chip--local { background: var(--krx-local-badge); color: #1f1f1f; }
.krx-chip--painted { background: var(--krx-painted-badge); }
.krx-chip--changed { background: var(--krx-changed-badge); }
