/* Bolum 3 - Filtreleme: filtre paneli (her satir 44 px: anahtar solda, kapsul deger sagda,
 * bilgisi olmayanlar altinda tek gri satir; katlanir gruplar, kayitli setler, kategori agaci,
 * paneli duzenle), "neden elendi / veri yok" dokumu, tablodaki durum, ayrintidaki "neden".
 * Siniflar fl- onekli. Filtre basina eleme sayisi YAZMAZ (kullanici karari). */

/* ---------------- filtre paneli ---------------- */
.fl-kutu { display: flex; flex-direction: column; }
.fl-kutu > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; height: 44px;
}
.fl-kutu > summary::-webkit-details-marker { display: none; }
.fl-kutu > summary h2 { flex: 1; }
.fl-kutu > summary::after {
  content: ""; width: 16px; height: 16px; flex: none; order: 9;
  background: currentColor; color: var(--text-3);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") center / 16px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") center / 16px no-repeat;
  transition: transform .15s;
}
.fl-kutu:not([open]) > summary::after { transform: rotate(-90deg); }
.fl-kutu[open] > summary { margin-bottom: 8px; }
.fl-grup { display: flex; flex-direction: column; }
.fl-grup + .fl-grup { margin-top: 24px; }
.fl-grup.fl-katli + .fl-grup { margin-top: 8px; }
/* grup basligi: 12 px gri ad; tiklayinca acilir / katlanir, katliyken icindeki acik filtre sayisi */
.fl-grup-bas {
  display: flex; align-items: center; gap: 8px; min-height: 32px; width: 100%; padding: 0;
  border: 0; background: transparent; cursor: pointer; text-align: left; color: var(--text-3);
}
.fl-grup-bas:hover { color: var(--text); }
.fl-grup-ad { flex: 1; font-size: 12px; line-height: 16px; color: inherit; }
.fl-ok { display: inline-flex; color: var(--text-3); }
.fl-ok .ikon { transition: transform .15s; }
.fl-katli .fl-ok .ikon { transform: rotate(-90deg); }
.fl-grup-ic { display: flex; flex-direction: column; }

.fl-filtre { display: flex; align-items: center; gap: 12px; min-height: 44px; min-width: 0; }
.fl-satir { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; cursor: pointer; }
.fl-ad { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fl-deger { width: 88px; flex: none; padding: 0 28px 0 12px; background-position: right 8px center; }
/* "Başka…": elle yazilan esik (sayi kutusu). Genel input[type=number] { width: 100% } kurali .fl-deger'i
   ezdigi icin genislik burada (secimle ayni) */
.fl-deger.fl-elle { width: 88px; padding: 0 12px; }
.fl-filtre.fl-pasif { opacity: .5; }
.fl-filtre.fl-pasif .fl-satir { cursor: not-allowed; }
/* "N uründe bilgi yok": anahtarin hizasindan sonra, gri, tek satir */
.fl-not { font-size: 12px; line-height: 16px; color: var(--text-3); padding: 0 0 8px 52px; margin: 0; }
.fl-not + .fl-filtre { margin-top: -4px; }
.fl-not.fl-not-duz { padding: 0; }
/* bagli secenek (Amazon bilgisi yoksa da ele): sahibinin altinda, anahtarin hizasindan sonra kutu */
.fl-filtre.fl-bagli { min-height: 36px; padding-left: 52px; }
.fl-filtre.fl-bagli .fl-satir { gap: 8px; }
/* yazi alani (marka listesi): sahibinin altinda */
.fl-metin { padding: 0 0 8px 52px; }
.fl-metin input { width: 100%; }
.fl-baglanti { border: 0; background: none; padding: 0; margin-left: 8px; color: var(--link); cursor: pointer; font: inherit; }
.fl-baglanti:hover { text-decoration: underline; }
.fl-yan-alt { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 24px; }

/* ---------------- kayitli setler ---------------- */
.fl-setler { display: flex; gap: 8px; margin-bottom: 16px; }
.fl-set-dugme { flex: 1; min-width: 0; justify-content: space-between; }
.fl-set-dugme .ikon { color: var(--text-3); }
.fl-set-liste { display: flex; flex-direction: column; gap: 4px; margin: -8px 0 16px; }
.fl-set-oge { display: flex; align-items: center; gap: 4px; }
.fl-set-oge .menu-oge { flex: 1; min-width: 0; }
.fl-set-oge.secili .menu-oge { background: var(--link-bg); color: var(--link); font-weight: 500; }

/* ---------------- kategori agaci (tasarim: Main) ---------------- */
.fl-kategori { display: flex; flex-direction: column; gap: 8px; }
.fl-mod { width: 100%; }
.fl-mod button { flex: 1; }
.fl-ara { position: relative; display: flex; align-items: center; }
.fl-ara > .ikon { position: absolute; left: 12px; color: var(--text-3); pointer-events: none; }
.fl-ara input { width: 100%; padding-left: 36px; }
.fl-agac { display: flex; flex-direction: column; }
.fl-dugum { display: flex; align-items: center; gap: 8px; min-height: 40px; min-width: 0; }
.fl-dugum-sec { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; cursor: pointer; }
.fl-dugum-ad { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fl-dugum-n { color: var(--text-3); flex: none; }
.fl-ac {
  width: 24px; height: 24px; display: grid; place-items: center; flex: none; padding: 0;
  border: 0; border-radius: var(--pill); background: transparent; color: var(--text-3); cursor: pointer;
}
.fl-ac:hover { background: var(--surface-2); }
.fl-ac.yaprak { visibility: hidden; }
/* kismen secili dugum: mavi kutu, icinde cizgi (tasarim: .cb.mixed) */
.fl-agac input[type=checkbox]:indeterminate { background: var(--link); border-color: var(--link); }
.fl-agac input[type=checkbox]:indeterminate::after {
  content: ""; position: absolute; left: 3px; right: 3px; top: 6.5px; height: 2px; border-radius: 2px;
  background: var(--on-primary);
}

/* ---------------- paneli duzenle: sira, cikar / ekle ---------------- */
.fl-duzen { display: flex; flex-direction: column; gap: 16px; }
.fl-duzen-grup { display: flex; flex-direction: column; }
.fl-duzen-bas { display: flex; align-items: center; gap: 4px; min-height: 36px; }
.fl-duzen-bas b { flex: 1; font-weight: 500; }
.fl-duzen-satir { display: flex; align-items: center; gap: 4px; min-height: 40px; padding-left: 16px; }
.fl-duzen-satir .tasma { flex: 1; }
.fl-tasi { width: 28px; height: 28px; }
.fl-yukari .ikon { transform: rotate(180deg); }
.fl-duzen .fl-yan-alt { margin-top: 0; }

/* ---------------- urun ayrintisi: neden gecti / elendi ---------------- */
.fl-neden { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.fl-neden li { display: flex; gap: 8px; align-items: flex-start; }
.fl-neden-ikon { display: inline-flex; flex: none; padding-top: 2px; }

/* ---------------- neden elendi / neden veri yok: sayili kapsullar ---------------- */
.fl-dokum { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 12px 16px; }
.fl-dokum-ad { display: inline-flex; align-items: center; padding-right: 8px; cursor: help; }
.fl-dokum-toplam { margin-left: auto; padding-left: 8px; }
/* Dokum tablonun ustundeyse ikisi tek kart gibi durur */
#bolge-dokum:has(.fl-dokum:not([hidden])) { margin-bottom: -16px; }
#bolge-dokum .fl-dokum { border-radius: var(--r-card) var(--r-card) 0 0; border-bottom: 1px solid var(--border); }
#bolge-dokum:has(.fl-dokum:not([hidden])) + #bolge-tablo .tb-kart { border-top-left-radius: 0; border-top-right-radius: 0; }

/* ---------------- tablodaki Durum ve ayrintidaki durum ---------------- */
.fl-durum { display: inline-flex; align-items: center; gap: 8px; max-width: 200px; vertical-align: middle; }
.fl-durum .pil { max-width: 100%; overflow: hidden; text-overflow: ellipsis; display: inline-block; line-height: 24px; flex: 0 1 auto; }
.fl-durum .alt { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.fl-durum-blok { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

@media (max-width: 700px) {
  .fl-filtre { min-height: 52px; }
  .fl-filtre.fl-bagli { min-height: 44px; }
  .fl-not { padding-left: 52px; }
  .fl-dugum { min-height: 44px; }
  .fl-dokum-toplam { margin-left: 0; }
}
