﻿/* ─────────────────────────────────────────────────────────────────────────
   laf_grid_styles.css
   LAF_Grid.razor global stilleri. MudBlazor bağımlılığı yok.

   index.html / app.css'e ekle:
   <link rel="stylesheet" href="css/laf_grid_styles.css" />
   ───────────────────────────────────────────────────────────────────────── */

/* ── Scroll anchoring TAMAMEN kapalı ───────────────────────────────────────
   Tarayıcının CSS Scroll Anchoring'i içerik değişince viewport'taki bir DOM
   alt-ağacını "çapa" seçip scroll'u ona göre ayarlar. Grid'de satıra tıklayınca
   (focused class değişimi) tarayıcı bunu içerik değişimi sanıp scroll'u ~10px
   kaydırıyordu — en belirgin: scroll EN ALTTAYKEN. overflow-anchor INHERITED
   DEĞİL; scroll container'ın İÇİNDEKİ HER elementte ayrı ayrı kapatılmalı. */
.lafg-scroll-container,
.lafg-scroll-container * {
    overflow-anchor: none;
}

/* ── Tablo ─────────────────────────────────────────────────────────────── */
.lafg-table {
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
    width: auto;
    --lafg-row-height: 46px;
}

    /* Virtualize spacer satırları height:0 iken tarayıcı phantom yükseklik
       verebilir → gizle. */
    .lafg-table tbody > tr[style*="flex-shrink"][style*="height: 0px"] {
        display: none;
    }

    .lafg-table > thead > tr > th:first-child,
    .lafg-table > tbody > tr > td:first-child {
        border-left: none;
    }

/* ── Container / Toolbar ───────────────────────────────────────────────── */
.lafg-container {
    cursor: pointer;
    outline: none;
}

.lafg-toolbar {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: var(--LAF-default-gap);
    padding-top: calc(var(--LAF-default-gap) - 4px);
    border-bottom: 1px solid var(--LAF-palette-lines-table);
    flex-shrink: 0;
}

/* ── Thead ─────────────────────────────────────────────────────────────── */
.lafg-thead {
    position: sticky;
    top: 0;
    z-index: 5;
    background-color: var(--LAF-palette-surface);
    outline-offset: -1px;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    user-select: none;
    backdrop-filter:blur(3px);
}

    .lafg-thead tr th {
        border-left: none !important;
    }

.lafg-th {
    box-sizing: border-box;
    padding: 8px 8px;
    font-weight: 600;
    text-align: left;
    white-space: nowrap;
    border-right: 1px solid var(--LAF-palette-lines-table);
    border-bottom: 1px solid var(--LAF-palette-lines-table);
    user-select: none;
    position: relative;
    overflow: visible;
}

.lafg-th-check {
    width: 36px;
    min-width: 36px;
    max-width: 36px;
    padding: 0;
    text-align: center;
    vertical-align: middle;
    line-height: 0;
}

.lafg-th-resizable {
    padding-right: 8px;
}

.lafg-th-inner {
    display: flex;
    align-items: center;
    gap: 2px;
    overflow: hidden;
}

.lafg-th-title {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lafg-sort-icon {
    flex-shrink: 0;
    color: var(--LAF-palette-primary);
    display: flex;
    align-items: center;
}

.lafg-filter-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    cursor: pointer;
    opacity: 0.5; /* filtre YOK → yarı saydam */
    transition: opacity .15s, background-color .15s, color .15s;
    border-radius: 3px;
    padding: 1px;
}

    .lafg-filter-icon:hover {
        opacity: 0.85;
    }

/* Filtre VAR → tam opak, primary renk + hafif primary zemin.
   Saydamlık farkı tek başına küçük ikonlarda yeterince okunmuyordu. */
.lafg-filter-active {
    opacity: 1 !important;
    color: var(--LAF-palette-primary);
    background-color: rgba(var(--LAF-palette-primary-rgb), 0.16);
}

/* ── Resize handle ─────────────────────────────────────────────────────── */
.lafg-resize-handle {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    cursor: col-resize;
    z-index: 2;
    touch-action: none;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    transform: translateX(3px);
}

    .lafg-resize-handle:hover {
        background-color: var(--LAF-palette-primary);
        opacity: 0.5;
    }

    .lafg-resize-handle:active {
        background-color: var(--LAF-palette-primary);
        opacity: 0.8;
    }

@media (max-width: 767px), (pointer: coarse) {
    .lafg-resize-handle {
        width: 5px;
        right: 0;
    }

        /* Dokunmatik için genişletilmiş yakalama alanı */
        .lafg-resize-handle::after {
            content: '';
            position: absolute;
            top: 0;
            bottom: 0;
            left: -12px;
            right: -12px;
        }
}

/* JS resize sırasında enjekte edilen görsel çizgi */
.lafg-resize-line-inner {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: var(--LAF-palette-primary);
    opacity: 0.75;
    z-index: 9999;
    pointer-events: none;
}

/* ── Satırlar (table view) ─────────────────────────────────────────────── */
.lafg-row {
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    overflow-anchor: none;
}

    .lafg-row > td.lafg-td-check {
        padding-top: 0;
        padding-bottom: 0;
    }

.lafg-autorowheight .lafg-row > td {
    height: auto;
    min-height: var(--lafg-row-height);
    white-space: normal;
    word-break: break-word;
    vertical-align: middle;
}

.lafg-row:hover > td {
    background-color: var(--LAF-palette-background-hoveredrow);
}

.lafg-row-focused {
    box-shadow: inset 4px 0 0 var(--LAF-palette-primary);
    background-color: var(--LAF-palette-background-focusedrow);
}

.lafg-row-selected {
    background-color: var(--LAF-palette-background-checkedrow);
}

/* ── Hücreler ──────────────────────────────────────────────────────────── */
.lafg-td {
    box-sizing: border-box;
    padding: 7px 8px;
    border-bottom: 1px solid var(--LAF-palette-lines-table);
    border-right: 1px solid var(--LAF-palette-lines-table);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
    max-width: 0;
    height: var(--lafg-row-height);
}

.lafg-td-first {
    border-left: none;
}

.lafg-td-check {
    width: 36px;
    min-width: 36px;
    max-width: 36px;
    padding: 0;
    text-align: center;
    vertical-align: middle;
    border-bottom: 1px solid var(--LAF-palette-lines-table);
    border-right: 1px solid var(--LAF-palette-lines-table);
    line-height: 0;
}

.lafg-td-right {
    text-align: right;
}

/* ── Footer ────────────────────────────────────────────────────────────── */
.lafg-footer-spacer {
    display: block;
    height: 0;
    min-height: 0;
    padding: 0;
    margin: 0;
    border: none;
    background: none;
    pointer-events: none;
}

.lafg-footer-bar {
    position: sticky;
    bottom: 0;
    z-index: 4;
}

.lafg-footer-table {
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 0;
    border-top: 1px solid var(--LAF-palette-lines-table);
    backdrop-filter:blur(3px);
}

.lafg-footer-td {
    height: var(--lafg-row-height, 38px);
    padding: 3px 8px;
    border-right: 1px solid var(--LAF-palette-lines-table);
    background: var(--LAF-palette-surface);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

    .lafg-footer-td:first-child {
        border-left: none;
    }

/* ── Status bar ────────────────────────────────────────────────────────── */
.lafg-statusbar {
    flex-shrink: 0;
    padding: 2px 10px;
    border-top: 1px solid var(--LAF-palette-lines-table);
    min-height: 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.lafg-statusbar-text {
    font-size: 0.71rem;
    color: var(--LAF-palette-text-secondary);
}

.lafg-clear-filters {
    font-size: 0.71rem;
    color: var(--LAF-palette-primary);
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
}

    .lafg-clear-filters:hover {
        text-decoration: underline;
    }

.lafg-show-selected-active {
    font-weight: 700;
}

/* ── Görünüm toggle linki ──────────────────────────────────────────────── */
.lafg-view-toggle {
    margin-left: auto;
    flex-shrink: 0;
}

.lafg-view-toggle-link {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 0.71rem;
    color: var(--LAF-palette-primary);
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    padding: 2px 6px;
    border-radius: 4px;
    transition: var(--LAF-default-colortransition);
}

    .lafg-view-toggle-link:hover {
        background-color: var(--LAF-palette-hover);
        text-decoration: none;
    }

.lafg-view-toggle-icon {
    font-size: 14px !important;
    width: 14px !important;
    height: 14px !important;
}

/* ── Loading placeholder ───────────────────────────────────────────────── */
.lafg-loading-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    min-height: 100px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   FİLTRE POPUP
   Üç gövde tipi aynı kabuğu paylaşır:
     • düz liste  (STR / NUM / diğer)  → .lafg-filter-list + .lafg-filter-item
     • BOOL       → .lafg-boolfilter
     • DATETIME   → .lafg-datefilter (Yıl → Ay → Gün ağacı)
   Kolon tipine göre kabuğa lafg-filter-popup-<datatype> class'ı da eklenir.
   ═══════════════════════════════════════════════════════════════════════════ */
.lafg-filter-overlay {
    position: fixed;
    inset: 0;
    z-index: 299;
}

@media (max-width: 767px) {
    .lafg-filter-overlay {
        background:calc(--LAF-palette-overlay);
        z-index: 8999;
    }
}

.lafg-filter-popup {
    position: absolute;
    z-index: 300;
    background: var(--LAF-palette-surface);
    border: 1px solid var(--LAF-palette-lines-table);
    border-radius: 6px;
    min-width: 200px;
    max-width: 280px;
    box-shadow: var(--LAF-default-popup-shadow);
    backdrop-filter:blur(3px);
}

@media (max-width: 767px) {
    /* Mobilde konumlandırma tamamen CSS'te: JS'in gönderdiği inline left/top
       (sabit 340px yükseklik VARSAYIMIYLA hesaplanmış bir tahmindir) !important
       ile yok sayılır. Popup'ın gerçek yüksekliği tipine göre değişiyor
       (BOOL ~180px, tarih ağacı ~400px) — ölçüm yapmak yerine ekranın gerçek
       ortasına sabitlemek hem doğru hem ucuz. */
    .lafg-filter-popup {
        position: fixed;
        z-index: 9000;
        min-width: 260px;
        max-width: calc(100vw - 16px);
        /* Ekranın yarısı. dvh, adres çubuğu açılıp kapanırken gerçek görünür
           alanı izler; desteklemeyen tarayıcı ikinci satırı yok sayar. */
        max-height: 50vh;
        max-height: 50dvh;
        border-radius: 10px;
        left: 50% !important;
        top: 50% !important;
        transform: translate(-50%, -50%) !important;
        display: flex;
        flex-direction: column;
        backdrop-filter: blur(3px);
    }

        /* Uzun listeler popup'ı taşırmasın: kabuk max-height ile sınırlı,
           kaydırma iç listede olur (header ve "Filtreyi Temizle" sabit kalır). */
        .lafg-filter-popup .lafg-filter-list,
        .lafg-filter-popup .lafg-datefilter {
            max-height: none;
            flex: 1 1 auto;
            min-height: 0;
            overflow-y: auto;
        }

        .lafg-filter-popup .lafg-popup-header,
        .lafg-filter-popup .lafg-filter-footer,
        .lafg-filter-popup .lafg-datefilter-toolbar {
            flex: 0 0 auto;
        }
}

.lafg-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 4px 4px 14px;
    border-bottom: 1px solid var(--LAF-palette-lines-table);
}

.lafg-popup-title {
    font-weight: 600;
}

.lafg-filter-list {
    max-height: 240px;
    overflow-y: auto;
}

.lafg-filter-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px 6px 10px;
    cursor: pointer;
    transition: var(--LAF-default-colortransition);
}

    .lafg-filter-item:hover {
        background-color: var(--LAF-palette-hover);
    }

.lafg-filter-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}

/* "(Tümü)" satırı — sayaç rozetini sağa itebilmesi için esner */
.lafg-filter-all-label {
    flex: 1;
    font-style: italic;
}

/* Değer başına satır adedi rozeti (düz liste + tarih ağacı ortak) */
.lafg-filter-count {
    margin-left: auto;
    flex-shrink: 0;
    font-size: 0.68rem;
    line-height: 1.55;
    padding: 0 6px;
    border-radius: 999px;
    color: var(--LAF-palette-text-secondary);
    background: rgba(var(--LAF-palette-primary-rgb), 0.10);
}

.lafg-filter-footer {
    padding: 4px 8px;
    border-top: 1px solid var(--LAF-palette-lines-table);
}

/* ── BOOL filtresi ─────────────────────────────────────────────────────────
   Distinct liste yerine münhasır seçenekler: Tümü / Evet / Hayır / (Boş).
   Kova boşsa buton disabled çizilir (tıklanınca 0 satır kalmasın). */
.lafg-filter-popup-bool {
    min-width: 190px;
}

.lafg-boolfilter {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 6px;
}

.lafg-boolfilter-opt {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 7px 10px;
    text-align: left;
    cursor: pointer;
    font: inherit;
    color: var(--LAF-palette-text);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    transition: var(--LAF-default-colortransition);
}

    .lafg-boolfilter-opt:hover:not(:disabled) {
        background-color: var(--LAF-palette-hover);
    }

    .lafg-boolfilter-opt:disabled {
        opacity: .4;
        cursor: default;
    }

.lafg-boolfilter-active {
    background: rgba(var(--LAF-palette-primary-rgb), 0.12);
    border-color: var(--LAF-palette-primary);
}

.lafg-boolfilter-icon {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.lafg-boolfilter-true .lafg-boolfilter-icon {
    color: var(--LAF-palette-primary);
}

.lafg-boolfilter-false .lafg-boolfilter-icon,
.lafg-boolfilter-empty .lafg-boolfilter-icon {
    color: var(--LAF-palette-text-secondary);
}

.lafg-boolfilter-label {
    flex: 1;
}

.lafg-boolfilter-count {
    font-size: 0.68rem;
    line-height: 1.55;
    padding: 0 6px;
    border-radius: 999px;
    color: var(--LAF-palette-text-secondary);
    background: rgba(var(--LAF-palette-primary-rgb), 0.10);
}

/* ── DATETIME filtresi (Yıl → Ay → Gün) ────────────────────────────────────
   Girinti inline style ile verilir (seviye × 18px); buradaki kurallar yalnız
   tipografi/etkileşim. Chevron kapalıyken sağa, açıkken aşağı bakar. */
.lafg-filter-popup-datetime {
    min-width: 240px;
}

.lafg-datefilter-toolbar {
    display: flex;
    justify-content: flex-end;
    padding: 4px 10px 2px;
}

.lafg-datefilter-link {
    font-size: 0.71rem;
    color: var(--LAF-palette-primary);
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
}

    .lafg-datefilter-link:hover {
        text-decoration: underline;
    }

.lafg-datefilter {
    max-height: 260px;
    padding-bottom: 4px;
}

.lafg-dfnode {
    display: flex;
    align-items: center;
    gap: 2px;
    padding-right: 8px;
    min-height: 28px;
    transition: var(--LAF-default-colortransition);
}

    .lafg-dfnode:hover {
        background-color: var(--LAF-palette-hover);
    }

.lafg-dfnode-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    cursor: pointer;
    border-radius: 4px;
    color: var(--LAF-palette-text-secondary);
    transform: rotate(180deg); /* ChevronLeft → sağa bakar (kapalı) */
    transition: transform .15s ease-out, color .15s ease-out;
}

    .lafg-dfnode-toggle:hover {
        color: var(--LAF-palette-primary);
    }

.lafg-dfnode-open {
    transform: rotate(-90deg); /* aşağı bakar (açık) */
}

.lafg-dfnode-toggle-empty {
    cursor: default;
    pointer-events: none;
}

.lafg-dfnode-main {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
    padding: 4px 0 4px 4px;
    cursor: pointer;
}

.lafg-dfnode-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lafg-dfnode-all {
    font-style: italic;
}

.lafg-dfnode-l0 .lafg-dfnode-label {
    font-weight: 600;
}

.lafg-dfnode-l2 .lafg-dfnode-label {
    color: var(--LAF-palette-text-secondary);
}

/* Cumartesi / Pazar — üç class'lık seçici, yukarıdaki l2 kuralını yener */
.lafg-dfnode.lafg-dfnode-weekend .lafg-dfnode-label {
    color: var(--LAF-palette-error, #e53935);
}

@media (prefers-reduced-motion: reduce) {
    .lafg-dfnode-toggle {
        transition: none;
    }
}

/* ── Card View ─────────────────────────────────────────────────────────── */
.lafg-cardview {
    display: block;
    padding: 8px;
    width: 100%;
    box-sizing: border-box;
}

    /* Card view Virtualize spacer div'leri */
    .lafg-cardview > div[style*="flex-shrink"][style*="height: 0px"] {
        display: none;
    }

.lafg-card {
    background-color: var(--LAF-default-editor-background);
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    min-height: 56px;
    margin-bottom: var(--LAF-default-gap);
    overflow-anchor: none;
    padding: 10px 4px;
    border: 1px solid var(--LAF-palette-lines);
}

.lafg-card-focused {
    box-shadow: inset 4px 0 0 var(--LAF-palette-primary);
    background-color: var(--LAF-palette-background-focusedrow);
}

.lafg-card-selected {
    background-color: var(--LAF-palette-background-checkedrow);
}

.lafg-card-check {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 8px 0 4px;
    border-right: 1px solid var(--LAF-palette-lines-table);
    flex-shrink: 0;
}

.lafg-card-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.lafg-card-row {
    display: flex;
    align-items: baseline;
    padding: 2px 10px;
    border-bottom: 1px solid rgba(128, 128, 128, 0.1);
    gap: 8px;
    min-height: 20px;
}

    .lafg-card-row:last-child {
        border-bottom: none;
    }

.lafg-card-label {
    flex: 0 0 35%;
    max-width: 35%;
    font-size: 0.80rem;
    font-weight: 600;
    color: var(--LAF-palette-text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lafg-card-value {
    flex: 1;
    font-size: 0.80rem;
    color: var(--LAF-palette-text);
    word-break: break-word;
    text-align: right;
}

.lafg-card-value-right {
    text-align: right;
}

/* ── Empty State (Veri Yok) ────────────────────────────────────────────────
   Outer "Tablo alanı" div'i (overflow:hidden + position:relative) içine
   absolute yerleştirilen overlay. Scroll container'ın DIŞINDA → yatay
   scroll'dan etkilenmez. Overlay HER ZAMAN DOM'da; görünürlüğü
   "lafg-empty-overlay-show" class'ı ile kontrol edilir → CSS transition
   hem giriş (aşağıdan yukarı + fade-in) hem çıkış (tersi) animasyonunu verir. */
.lafg-empty-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, calc(-50% + 30px));
    opacity: 0;
    max-width: calc(100% - 16px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    pointer-events: none;
    user-select: none;
    z-index: 1;
    transition: opacity 0.28s ease-out, transform 0.28s ease-out;
}

.lafg-empty-overlay-show {
    opacity: 1;
    transform: translate(-50%, -50%);
}

.lafg-empty-art {
    width: 132px;
    margin-bottom: -2px;
    animation: lafg-empty-float 3.6s ease-in-out infinite alternate;
    animation-play-state: paused;
}

.lafg-empty-overlay-show .lafg-empty-art {
    animation-play-state: running;
}

.lafg-empty-svg {
    width: 100%;
    height: auto;
    display: block;
    overflow: visible; /* glow blur kırpılmasın */
}

.lafg-empty-glow {
    fill: var(--LAF-palette-primary);
    opacity: 0.12;
    filter: blur(16px);
}

.lafg-empty-card-back {
    fill: var(--LAF-palette-surface);
    stroke: rgba(var(--LAF-palette-primary-rgb), 0.18);
    stroke-width: 2;
}

.lafg-empty-card {
    fill: var(--LAF-palette-surface);
    stroke: rgba(var(--LAF-palette-primary-rgb), 0.38);
    stroke-width: 2;
}

.lafg-empty-head {
    fill: var(--LAF-palette-primary);
    opacity: 0.65;
}

.lafg-empty-line {
    fill: var(--LAF-palette-text-secondary);
}

.lafg-empty-line-1 {
    opacity: 0.32;
}

.lafg-empty-line-2 {
    opacity: 0.24;
}

.lafg-empty-line-3 {
    opacity: 0.15;
}

.lafg-empty-glass-fill {
    fill: rgba(var(--LAF-palette-primary-rgb), 0.07);
}

.lafg-empty-glass-ring {
    fill: none;
    stroke: var(--LAF-palette-primary);
    stroke-width: 3.4;
}

.lafg-empty-glass-handle {
    stroke: var(--LAF-palette-primary);
    stroke-width: 4;
    stroke-linecap: round;
}

@keyframes lafg-empty-float {
    from {
        transform: translateY(-3px);
    }

    to {
        transform: translateY(3px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .lafg-empty-art {
        animation: none;
    }
}

.lafg-empty-title {
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.2px;
    color: var(--LAF-palette-text-secondary);
    opacity: 0.92;
    margin-top: -10px;
}

.lafg-empty-subtitle {
    margin-top: 8px;
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--LAF-palette-primary-lighten);
    background: rgba(var(--LAF-palette-primary-rgb), 0.12);
    padding: 2px 10px;
    border-radius: 999px;
    line-height: 1.6;
}

.lafg-empty-clear {
    margin-top: 3px;
    font-size: 0.72rem;
    color: var(--LAF-palette-primary-lighten);
    text-decoration: underline;
    cursor: pointer;
    pointer-events: none; /* overlay gizliyken tıklanamasın */
}

.lafg-empty-overlay-show .lafg-empty-clear {
    pointer-events: auto;
}

.lafg-empty-clear:hover {
    opacity: 0.85;
}

/* ── İlk-paint reveal ──────────────────────────────────────────────────── */
.lafg-rows-first-paint-hidden {
    opacity: 0;
}

.lafg-rows-first-paint-visible {
    opacity: 1;
    transition: opacity 0.2s ease-out;
    will-change: opacity;
}

/* Reveal penceresinde scroll'u kapat: ölçüm/spacer yeniden hesapları
   scrollHeight'i oynatıp scrollbar'ı zıplatıyor. Gizliyken zaten görünmüyor. */
.lafg-scroll-container.lafg-scroll-measuring {
    overflow: hidden !important;
}

/* ── Checkbox (inline, harici kütüphane yok) ───────────────────────────── */
.lafg-check {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    line-height: 0;
}

/* Native input görünmez, ama tıklama alanı = kutu boyutu */
.lafg-check-native {
    position: absolute;
    inset: 0;
    margin: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 1;
}

.lafg-check-box {
    position: relative; /* üç durumlu (mixed) çizgisi için */
    width: 16px;
    height: 16px;
    box-sizing: border-box;
    border: 2px solid var(--LAF-palette-text-secondary);
    border-radius: 3px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--LAF-default-colortransition);
}

.lafg-check-svg {
    width: 100%;
    height: 100%;
    fill: #fff;
    opacity: 0;
    transform: scale(.6);
    transition: opacity .12s, transform .12s;
}

/* checked → kutuyu doldur + tik'i göster (input, box'ın önceki kardeşi) */
.lafg-check-native:checked + .lafg-check-box {
    background-color: var(--LAF-palette-primary);
    border-color: var(--LAF-palette-primary);
}

    .lafg-check-native:checked + .lafg-check-box .lafg-check-svg {
        opacity: 1;
        transform: scale(1);
    }

/* ── Üç durumlu (mixed / indeterminate) ────────────────────────────────────
   "(Tümü)" ve tarih ağacındaki üst düğümler kısmi seçimde bu class'ı alır:
   kutu dolu ama tik yerine kısa bir çizgi. Native `indeterminate` DOM
   property'si Blazor'dan set edilemediği için görünüm class ile yönetilir. */
.lafg-check-box.lafg-check-mixed {
    background-color: var(--LAF-palette-primary);
    border-color: var(--LAF-palette-primary);
}

    .lafg-check-box.lafg-check-mixed .lafg-check-svg {
        opacity: 0;
    }

    .lafg-check-box.lafg-check-mixed::after {
        content: '';
        position: absolute;
        left: 50%;
        top: 50%;
        width: 8px;
        height: 2px;
        border-radius: 1px;
        background: #fff;
        transform: translate(-50%, -50%);
    }

.lafg-popup-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: none;
    background-color: transparent;
    color: var(--LAF-palette-text-secondary);
    cursor: pointer;
    border-radius: 4px;
    line-height: 0;
    transition: var(--LAF-default-colortransition)
}

    .lafg-popup-close:hover {
        background-color: var(--LAF-palette-hover);
        color: var(--LAF-palette-text-onprimary);
    }

/* ── Indeterminate progress bar ────────────────────────────────────────────
   İki katman: soluk primary zemin şerit + üzerinde sağa akan parlak bar.
   transform tabanlı animasyon (layout tetiklemez, GPU'da akıcı). */
.lafg-progress-linear {
    height: 3px;
    overflow: hidden;
    background-color: rgba(var(--LAF-palette-primary-rgb), 0.15);
}

.lafg-progress-bar {
    padding-left: 10px;
    padding-right: 10px;
    height: 100%;
    width: 40%; /* dar bar → daha çevik görünür */
    background-color: var(--LAF-palette-primary);
    box-shadow: 0 0 6px rgba(var(--LAF-palette-primary-rgb), 0.9);
    border-radius: 2px;
    animation: lafg-progress-indeterminate 0.9s linear infinite;
    will-change: transform;
}

@keyframes lafg-progress-indeterminate {
    0% {
        transform: translateX(-120%);
    }

    100% {
        transform: translateX(320%);
    }
}
