/* ================================================================
   RETRO TEMA — popmundo-bible.net "Retro" görünümü
   popmundo-v2.css'ten SONRA yüklenir. Değişkenleri teal palete
   çevirir + imza bileşenleri (çerçeve, panel başlığı, tablo, font)
   override eder. Kaldırmak için app.blade.php'deki <link>'i sil.
   ================================================================ */

/* --- 1) Renk paletini teal'e çevir (değişken remap) --- */
body.theme-v2 {
  --v2-page-bg: #54b2c9;
  --v2-frame-bg: #a4cfdf;
  --v2-card: #e2eff1;
  --v2-card-edge: #a4cfdf;
  --v2-card-edge-soft: #cfe4ec;

  --v2-hdr-top: #3d849c;
  --v2-hdr-bot: #3d849c;
  --v2-hdr-edge: #337287;
  --v2-hdr-text: #ffffff;

  /* Kalın tablo başlığı = panel başlığıyla aynı teal (#659caf), düz renk. */
  --v2-thead-bg-top: #659caf;
  --v2-thead-bg-bot: #659caf;
  --v2-thead-edge: #557f92;
  --v2-thead-text: #ffffff;

  --v2-row-alt: #c2d9e4;  /* satır hover tonu (zebradan koyu) */
  --v2-row-base: #d0e2ea; /* zebra ŞERİT B — koyu teal (ŞERİT A = card bg) */
  --v2-rail-hover: #d3ebf1;
  --v2-rail-active: #c3e2ec;

  --v2-ink: #1a1a1a;
  --v2-ink-2: #333333;
  --v2-muted: #5a7580;

  --v2-link: #006699;
  --v2-link-hover: #004466;
  --v2-active: #006699;
  --v2-warn: #cc7a00;

  --v2-money: #006699;
}

/* --- 2) Font + sayfa arka planı (desenli duvar kağıdı) --- */
body.theme-v2 {
  font-family: "Lucida Grande", Verdana, sans-serif !important;
  font-size: 12px !important;
  background: #87acb5 !important; /* varsayılan: düz renk (desenli, Görüntü Ayarları'ndan opsiyonel) */
  color: var(--v2-ink);
}
html:has(body.theme-v2) { background: #87acb5 !important; }

body.theme-v2 input,
body.theme-v2 select,
body.theme-v2 textarea,
body.theme-v2 button,
body.theme-v2 table {
  font-family: "Lucida Grande", Verdana, sans-serif !important;
}

/* --- 3) Çerçeve (container) — kalın mavi frame + 7px köşe --- */
body.theme-v2 .pm-container {
  background: var(--v2-frame-bg) !important;
  border: 2px solid #3d849c !important;
  border-radius: 7px !important;
  box-shadow: none !important;
}

/* --- 4) Panel = box (düz, 7px köşe, kenarsız) --- */
body.theme-v2 .panel {
  background: var(--v2-card) !important;
  border: 0 !important;
  border-radius: 7px !important;
  box-shadow: none !important;
  overflow: hidden !important;
}

/* --- 5) Panel başlığı = teal çubuk (İMZA görünüm) --- */
body.theme-v2 .panel-header {
  background: #659caf !important;
  color: #ffffff !important;
  font-weight: bold !important;
  font-size: 12px !important;
  border: 0 !important;
  border-radius: 7px 7px 0 0 !important;
  text-shadow: none !important;
}
body.theme-v2 .panel-header span,
body.theme-v2 .panel-header .v2-hdr-sub,
body.theme-v2 .panel-header a {
  color: #ffffff !important;
}

/* --- 6) Yan menü başlıkları da teal çubuk --- */
body.theme-v2 .side-menu-title {
  background: #659caf !important;
  color: #ffffff !important;
  font-weight: bold !important;
  border-radius: 7px 7px 0 0 !important;
}

/* --- 7) TUTARLI ZEBRA — 2 renk: section bg (#E2EFF1) + koyu teal --- */
/* Zebra'lı panellerin gövdesi section teal; stripe A (tek satır) bununla kaynaşır,
   stripe B (çift satır) koyu teal olarak pop eder. Beyaz yok. */
body.theme-v2 .panel-body:has(table),
body.theme-v2 .panel-body:has(.v2-rel-row),
body.theme-v2 .panel-body:has(.v2-journal),
body.theme-v2 .panel-body:has(.v2-inv-item),
body.theme-v2 .panel-body:has(.v2-offer-item),
body.theme-v2 .panel-body:has(.v2-give-item),
body.theme-v2 .panel-body:has(.v2-skill-row),
body.theme-v2 .panel-body:has(.v2-interact-row),
body.theme-v2 .panel-body:has(.v2-preq-row),
body.theme-v2 .panel-body:has(.cv-row) {
  background: var(--v2-card) !important;
}
/* Zebra ŞERİT A (tek satırlar — ilk satır dahil) = section (card) arka planı.
   Kural: zebra sadece 2 renk; biri daima section bg, böylece ilk satır bg ile aynı. */
body.theme-v2 .panel table tbody tr:nth-of-type(odd) td,
body.theme-v2 .v2-rel-row:nth-child(odd),
body.theme-v2 .v2-journal .e:nth-child(odd),
body.theme-v2 .v2-inv-item:nth-child(odd),
body.theme-v2 .v2-offer-item:nth-child(odd),
body.theme-v2 .v2-give-item:nth-child(odd),
body.theme-v2 .v2-skill-row:nth-child(odd),
body.theme-v2 .v2-interact-row:nth-child(odd),
body.theme-v2 .v2-preq-row:nth-child(odd),
body.theme-v2 .v2-city-kv .kv:nth-child(odd),
body.theme-v2 .v2-kv-table .v2-kv:nth-child(odd),
body.theme-v2 .cv-row:nth-of-type(odd) {
  background: var(--v2-card) !important;
}
/* Zebra ŞERİT B (çift satırlar) = tek koyu teal ton */
body.theme-v2 .panel table tbody tr:nth-of-type(even) td,
body.theme-v2 .v2-rel-row:nth-child(even),
body.theme-v2 .v2-journal .e:nth-child(even),
body.theme-v2 .v2-inv-item:nth-child(even),
body.theme-v2 .v2-offer-item:nth-child(even),
body.theme-v2 .v2-give-item:nth-child(even),
body.theme-v2 .v2-skill-row:nth-child(even),
body.theme-v2 .v2-interact-row:nth-child(even),
body.theme-v2 .v2-preq-row:nth-child(even),
body.theme-v2 .v2-city-kv .kv:nth-child(even),
body.theme-v2 .v2-kv-table .v2-kv:nth-child(even),
body.theme-v2 .cv-row:nth-of-type(even) {
  background: var(--v2-row-base) !important;
}
/* Sabıka (crime): davadan sonra gizli "detay" satırı var → dava satırları 4n ile döner.
   4n+1 (ilk, 3., ...) = bg ; 4n+3 (2., 4., ...) = koyu şerit. */
body.theme-v2 .v2-crime-table tbody tr.case:nth-child(4n+1) td {
  background: var(--v2-card) !important;
}
body.theme-v2 .v2-crime-table tbody tr.case:nth-child(4n+3) td {
  background: var(--v2-row-base) !important;
}
/* Açıklama (intro) kutusu: beyaz değil, klasik section içi teal */
body.theme-v2 .v2-skill-intro {
  background: var(--v2-card) !important;
}
/* Sıralanabilir başlık hover teal */
body.theme-v2 [class*="-table"] thead th.sortable:hover {
  background: linear-gradient(to bottom, #4a91a8, #34798d) !important;
  color: #ffffff !important;
}

/* --- 8) Düzleştir (gölgeleri kaldır) --- */
body.theme-v2 .v2-venue,
body.theme-v2 .side-menu-wrap,
body.theme-v2 .v2-card,
body.theme-v2 .panel {
  box-shadow: none !important;
}

/* --- 9) Üst chrome: SEKİZ logo çubuğu + nav sekmeleri + avatar → teal --- */
body.theme-v2 .v2-logo-bar {
  background: linear-gradient(to bottom, #57b0c6, #3d849c) !important;
  border-bottom: 1px solid #2c6a8f !important;
  box-shadow: none !important;
  border-radius: 5px 5px 0 0 !important;
}
body.theme-v2 .v2-logo {
  color: #ffffff !important;
  font-family: 'Titan One', cursive !important;
  font-weight: 400 !important;
  text-transform: none !important;
  letter-spacing: 0.015em !important;
  font-size: 32px !important;
  text-shadow: 0 2px 2px rgba(0, 0, 0, .22) !important;
}
body.theme-v2 .v2-logo .accent { color: #cdeaf2 !important; }

body.theme-v2 .nav-tabs {
  background: linear-gradient(to bottom, #eaf6f9, #cfe4ec) !important;
  border: 1px solid #86bccd !important;
  box-shadow: none !important;
}
body.theme-v2 .nav-tab.active {
  background: #e2eff1 !important;
  color: #006699 !important;
  box-shadow: inset 0 -2px 0 #3d849c !important;
}
body.theme-v2 .nav-tab:hover { background: rgba(255, 255, 255, .5) !important; }

body.theme-v2 .pm-avatar-large,
body.theme-v2 .pm-avatar-medium,
body.theme-v2 .pm-avatar-small {
  background: #dce9ee !important;
  border-color: #a4cfdf !important;
}

/* Ekran okuyucu için görünmez etiket (erişilebilirlik) */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Forum post barında "Forum Mesajı: xx" — normal barda açık beyaz, yetkili (sarı) barda koyu */
body.theme-v2 .v2-pb-postcount {
  font-size: 10.5px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.2;
}
body.theme-v2 .v2-post.is-authority .v2-pb-postcount {
  color: #8a7320;
}

/* Buton içi ikonları boyutlandır + metin tek satırda kalsın (yoksa "Kabul Et" alta kayıyor) */
body.theme-v2 .v2-btn-default {
  white-space: nowrap;
}
body.theme-v2 .v2-btn-default > svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* Görme engelli optimizasyonu (Görüntü Ayarları'ndan açılır):
   etiket-değer çiftleri ekran okuyucuda "Etiket: Değer" diye okunsun */
body.theme-v2.sr-optimized .v2-kv-table .kv .k::after {
  content: ":";
}

/* Futbol İstatistikleri — "Gol/Asist Krallığı" ve "Rekor" başlıkları teal (tema uyumu) */
body.theme-v2 .v2-fb-stat-pair .v2-stat-col-hdr {
  background: linear-gradient(to bottom, var(--v2-thead-bg-top), var(--v2-thead-bg-bot)) !important;
  color: var(--v2-thead-text) !important;
  border-bottom: 1px solid var(--v2-thead-edge) !important;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 11.5px;
}
body.theme-v2 .v2-rec-section .v2-rec-head {
  background: linear-gradient(to bottom, var(--v2-thead-bg-top), var(--v2-thead-bg-bot));
  color: var(--v2-thead-text);
  padding: 8px 14px;
  border-bottom: 1px solid var(--v2-thead-edge);
  border-radius: 3px 3px 0 0;
  margin: 0 0 10px;
}

/* --- Grafiti duvarı (mekan grafiti gösterimi + çizim tuvali arka planı) --- */
.gf-wall {
  background-color: #a79e92;
  background-image:
    radial-gradient(ellipse at 28% 18%, rgba(255,255,255,.10), transparent 62%),
    radial-gradient(ellipse at 82% 88%, rgba(0,0,0,.10), transparent 60%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='gfn'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.68' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23gfn)' opacity='0.14'/%3E%3C/svg%3E");
  box-shadow: inset 0 0 24px rgba(0,0,0,.22);
}

/* --- Bold = yarı-kalın (600). Oyundaki tüm metin bold'u bu seviyede olmalı.
       Tam kalın (700) aşırı ağır duruyor; metin vurgusu hep 600. --- */
body.theme-v2 b,
body.theme-v2 strong {
  font-weight: 600 !important;
}

/* Meslek bölüm başlıkları: tam kalın değil, 600. */
body.theme-v2 .v2-job-head { font-weight: 600; }
/* Son bölümün altında gereksiz boşluk olmasın (body padding yeter). */
body.theme-v2 .panel-body > .v2-job-section:last-child { padding-bottom: 0; }
body.theme-v2 .panel-body > .v2-job-section:last-child .v2-stat-rows { padding-bottom: 0; }
body.theme-v2 .panel-body > .v2-job-section:last-child .v2-stat-rows .row:last-child { padding-bottom: 2px; }

/* Kurs kayıt tablosu — yetenek isimleri bold değil, normal metin */
body.theme-v2 .v2-sk-table tbody td.sk-name { font-weight: 400; }

/* Mobil online göstergesi — yeşil nokta yerine telefon ikonu */
body.theme-v2 .v2-ph-ico {
  width: 13px;
  height: 13px;
  display: inline-block;
  vertical-align: -2px;
  color: #2d8a52;
  flex-shrink: 0;
}
body.theme-v2 .v2-online--mobile::before { display: none !important; }
body.theme-v2 .v2-online-tag.is-mobile .dot { display: none; }
/* Telefon defteri durum sütunu: mobilde yeşil nokta yerine telefon ikonu (yine çevrimiçi sayılır) */
body.theme-v2 .v2-friend-table .pres.is-mobile::before { display: none !important; }
body.theme-v2 .v2-friend-table .pres.is-mobile .v2-ph-ico { margin-right: 5px; }

/* Üyelik güven barı */
body.theme-v2 .v2-trust-bar {
  height: 10px;
  background: var(--v2-row-alt, #e4ecf1);
  border: 1px solid var(--v2-card-edge-soft, #cfe4ec);
  border-radius: 6px;
  overflow: hidden;
}
body.theme-v2 .v2-trust-bar-fill {
  height: 100%;
  background: linear-gradient(to right, #3d9a67, #2d8a52);
  border-radius: 6px;
  transition: width .3s ease;
}
