/* takvim.css — Paylasilan macOS-stili tarih secici (takvim-secici.js ile). Native
   <input type=date> yerine: gorunur alan + acilir takvim paneli (ay/yil gezinme, gun grid,
   bugun isareti, secili vurgu, Temizle/Bugun). Panel body'ye portal + position:fixed
   (accordion/scroll kirpmaz). Tema-uyumlu (light/dark); saat secici diliyle ayni. */

/* Tetik alan (gorunur kutu) — .pai-saat-alan ile ayni dil. */
.pai-takvim { position: relative; }
.pai-takvim-alan {
  display: flex; align-items: center; gap: 8px; width: 100%;
  height: 38px; padding: 0 12px;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: 10px;
  font-family: var(--font); font-size: 14px; font-weight: 500;
  cursor: pointer; text-align: left;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.pai-takvim-alan:hover { border-color: var(--border-strong, var(--border)); }
/* Form alan-alti hata durumu (.mac-input.error ile ayni dil).
   Ikinci secici: PAI.form gizli degeri degil KULLANICININ GORDUGU butonu isaretler
   (gorselHedef) — o yuzden .error dogrudan butonda da olabilir. */
.pai-takvim.error .pai-takvim-alan,
.pai-takvim-alan.error {
  border-color: var(--red);
  background: rgba(255, 59, 48, 0.04);
}
.pai-takvim-alan:focus-visible,
.pai-takvim.acik .pai-takvim-alan {
  outline: none; border-color: var(--accent, #007AFF);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent, #007AFF) 18%, transparent);
}

/* Kural gereği kapalı tarih (ör. vekâlette "süresiz" seçiliyken bitiş). Yalnız gizli değeri
   disable etmek ekranı yalancı bırakır: buton tıklanır, takvim açılır, seçim hiçbir yere
   gitmez. Kapalı bir alan kapalı GÖRÜNMELİ. */
.pai-takvim.kilitli .pai-takvim-alan,
.pai-takvim-alan:disabled {
  background: var(--gray-surface);
  color: var(--muted);
  cursor: not-allowed;
  opacity: .65;
}
.pai-takvim-alan > .bi-calendar3 { color: var(--muted); font-size: 14px; }
.pai-takvim-metin { flex: 1; font-variant-numeric: tabular-nums; letter-spacing: .3px; }
.pai-takvim.bos .pai-takvim-metin { color: var(--muted); }
.pai-takvim-ok { color: var(--muted); font-size: 12px; transition: transform .18s ease; }
.pai-takvim.acik .pai-takvim-ok { transform: rotate(180deg); }

/* Acilir panel (body'ye portal, position:fixed). */
.pai-takvim-panel {
  /* Dar ekranda (<312px) pencereden genis olmasin; balon.js kenar payi 6px x 2. */
  position: fixed; z-index: 9500; width: 300px; max-width: calc(100vw - 12px); max-height: calc(100vh - 12px); overflow-y: auto;
  background: var(--surface, rgba(255,255,255,0.98));
  backdrop-filter: var(--cam-panel); -webkit-backdrop-filter: var(--cam-panel);
  border: 1px solid var(--border-soft); border-radius: 16px;
  box-shadow: 0 18px 44px rgba(0,0,0,0.22), inset 0 0 0 1px rgba(255,255,255,0.4);
  opacity: 0; transform: translateY(-6px) scale(.98);
  transition: opacity .14s ease, transform .14s ease;
  pointer-events: none; overflow: hidden;
}
.pai-takvim-panel.gor { opacity: 1; transform: none; pointer-events: auto; }

/* Baslik seridi: ay-yil + ileri/geri */
.tk-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; border-bottom: 1px solid var(--border-soft);
}
.tk-baslik {
  border: 0; background: transparent; cursor: pointer;
  font-family: var(--font); font-size: 14px; font-weight: 600; color: var(--text);
  padding: 4px 8px; border-radius: 8px;
  transition: background .12s ease;
}
.tk-baslik:hover { background: var(--gray-surface); }
.tk-nav { display: flex; align-items: center; gap: 2px; }
.tk-nav-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border: 0; border-radius: 8px; cursor: pointer;
  background: transparent; color: var(--muted); font-size: 14px;
  transition: background .12s ease, color .12s ease;
}
.tk-nav-btn:hover { background: var(--gray-surface); color: var(--text); }
.tk-nav-btn:active { transform: scale(.94); }

/* Govde: gun isimleri + grid */
.tk-govde { padding: 12px 14px; }
/* pencere-tara: kirilma-gerekmiyor — yedi-sutunlu gun basligi — gun sayisi sabit */
.tk-gunler-bas {
  display: grid; grid-template-columns: repeat(7, 1fr); margin-bottom: 8px;
}
.tk-gunler-bas span {
  text-align: center; font-size: 10px; font-weight: 700; letter-spacing: .6px;
  text-transform: uppercase; color: var(--muted);
}
/* pencere-tara: kirilma-gerekmiyor — yedi-sutunlu gun izgarasi; panel sabit genislikte (280px), pencereyle olceklenmez */
.tk-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.tk-gun {
  position: relative; height: 34px; border: 0; border-radius: 9px; cursor: pointer;
  background: transparent; color: var(--text);
  font-family: var(--font); font-size: 13px; font-variant-numeric: tabular-nums;
  transition: background .12s ease, color .12s ease;
}
.tk-gun:hover { background: var(--gray-surface); }
.tk-gun.disli { color: var(--muted); opacity: .55; }   /* onceki/sonraki ay */
.tk-gun.bugun { color: var(--accent, #007AFF); font-weight: 700; }
.tk-gun.bugun::after {
  content: ""; position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%);
  width: 4px; height: 4px; border-radius: 50%; background: var(--accent, #007AFF);
}
.tk-gun.secili {
  background: var(--accent, #007AFF); color: #fff; font-weight: 600;
  box-shadow: 0 2px 10px color-mix(in srgb, var(--accent, #007AFF) 40%, transparent);
}
.tk-gun.secili::after { background: #fff; }
/* Sinir disi (data-min/data-max) gunler: tiklanamaz, soluk. */
.tk-gun.kapali { color: var(--muted); opacity: .3; cursor: not-allowed; pointer-events: none; }
.tk-gun.kapali:hover { background: transparent; }

/* Ay/Yil hizli-atlama modu: gun-isim satiri gizlenir, grid 3 sutuna geçer. */
.pai-takvim-panel.tk-mod-ay .tk-gunler-bas,
.pai-takvim-panel.tk-mod-yil .tk-gunler-bas { display: none; }
.pai-takvim-panel.tk-mod-ay .tk-grid,
.pai-takvim-panel.tk-mod-yil .tk-grid { grid-template-columns: repeat(3, 1fr); gap: 6px; }
.tk-hucre {
  height: 44px; border: 0; border-radius: 10px; cursor: pointer;
  background: transparent; color: var(--text);
  font-family: var(--font); font-size: 13px; font-variant-numeric: tabular-nums;
  transition: background .12s ease, color .12s ease;
}
.tk-hucre:hover { background: var(--gray-surface); }
.tk-hucre.bugun { color: var(--accent, #007AFF); font-weight: 700; }
.tk-hucre.secili {
  background: var(--accent, #007AFF); color: #fff; font-weight: 600;
  box-shadow: 0 2px 10px color-mix(in srgb, var(--accent, #007AFF) 40%, transparent);
}

/* Alt cubuk: Temizle / Bugun */
.tk-alt {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 12px; border-top: 1px solid var(--border-soft);
}
.tk-temizle, .tk-bugun {
  display: inline-flex; align-items: center; gap: 6px;
  border: 0; background: transparent; cursor: pointer;
  font-family: var(--font); font-size: 12px; font-weight: 600;
  padding: 6px 10px; border-radius: 8px;
}
.tk-temizle { color: var(--muted); }
.tk-temizle:hover { background: var(--gray-surface); color: var(--text); }
.tk-bugun { color: var(--accent, #007AFF); }
.tk-bugun:hover { background: color-mix(in srgb, var(--accent, #007AFF) 12%, transparent); }

/* Inline filtre cubugunda dar tetik (native .mac-input.date 150px/32px karsiligi).
   Depo .dt-dr-takvim kalibinin global/yeniden-kullanilabilir surumu. */
.pai-takvim.tk-filtre { width: 150px; flex: 0 0 auto; }
.pai-takvim.tk-filtre .pai-takvim-alan { height: 32px; font-size: 12.5px; }

/* TARIH CIFTI TEK OGEDIR (QA-03). Baslangic + ayirici + bitis, sarilabilir bir `.filter-line`
   icinde UC AYRI kardes olarak durursa satir kirilmasi ARALARINA girebiliyor: baslangic ilk
   satirin sagina, bitis bir sonraki satirin en soluna dusuyor ve ikisinin ilistigi gorunmez
   oluyor (olculdu: baslangic merkezi 1158,413 — bitis merkezi 380,456). Grup kendi icinde
   kirilmaz, bir butun olarak alt satira gecer. */
.pai-tarih-araligi {
  display: inline-flex; align-items: center; gap: 8px;
  flex: 0 0 auto; flex-wrap: nowrap;
}
.pai-tarih-araligi > .range-sep { color: var(--muted); flex: 0 0 auto; }

/* pencere-tara: kirilma-gerekmiyor — yedi-sutunlu gun izgarasi tarih secici panelinde sabit genislikte (280px) yasar, pencereyle olceklenmez */
