/* ════════════════════════════════════════════════════════════════
   bbl-pending-transfer.css — İLERİ TARİHLİ TAKAS EMRİ paneli
   Oyun teması: koyu lacivert (#0b1220/#0f172a) + altın (#facc15) vurgu.
   ════════════════════════════════════════════════════════════════ */

.pt-overlay {
  position: fixed; inset: 0; z-index: 300001;   /* alt menü (#pg-bottom-nav z:300000) üstünde */
  background: rgba(3, 7, 18, 0.82);
  backdrop-filter: blur(6px);
  display: none; align-items: flex-start; justify-content: center;
  opacity: 0; transition: opacity 0.25s ease;
  padding: 14px; overflow-y: auto;
  padding-top: max(14px, env(safe-area-inset-top, 0px));
}

.pt-box {
  width: 100%; max-width: 560px;
  background: linear-gradient(180deg, #111c30 0%, #0c1424 100%);
  border: 1px solid rgba(250, 204, 21, 0.18);
  border-radius: 16px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.6);
  display: flex; flex-direction: column;
  max-height: calc(100vh - 28px);
  position: relative; overflow: hidden;
  animation: ptIn 0.32s cubic-bezier(0.34, 1.4, 0.64, 1);
}
@keyframes ptIn { from { opacity: 0; transform: translateY(16px) scale(0.97); } to { opacity: 1; transform: none; } }

/* ── Başlık ── */
.pt-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px 10px;
}
.pt-title { font-size: 16px; font-weight: 800; color: #f8fafc; display: flex; align-items: center; gap: 8px; }
.pt-ic { font-size: 18px; }
.pt-x {
  background: rgba(148, 163, 184, 0.12); border: none; color: #cbd5e1;
  width: 30px; height: 30px; border-radius: 8px; font-size: 15px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  transition: background 0.15s;
}
.pt-x:hover { background: rgba(148, 163, 184, 0.22); }
.pt-sub { padding: 0 18px 12px; font-size: 11.5px; color: #94a3b8; line-height: 1.5; }
.pt-sub-tag {
  display: inline-block; font-size: 8.5px; font-weight: 800; letter-spacing: 0.5px;
  color: #1a1505; background: #facc15; padding: 1px 6px; border-radius: 6px; margin-right: 5px;
  vertical-align: middle;
}

/* Transfer açıkken bilgilendirme ekranı */
.pt-info { padding: 24px 22px 30px; text-align: center; }
.pt-info-ic { font-size: 40px; line-height: 1; margin-bottom: 12px; }
.pt-info-title { font-size: 16px; font-weight: 800; color: #4ade80; margin-bottom: 8px; }
.pt-info-text { font-size: 12.5px; color: #cbd5e1; line-height: 1.6; max-width: 380px; margin: 0 auto; }
.pt-info-text b { color: #f1f5f9; }
.pt-info-divider { height: 1px; background: rgba(148, 163, 184, 0.15); margin: 20px auto; max-width: 240px; }
.pt-info-note {
  font-size: 11.5px; color: #94a3b8; line-height: 1.6; max-width: 380px; margin: 0 auto;
  background: rgba(138, 160, 194, 0.06); border: 1px solid rgba(138, 160, 194, 0.12);
  border-radius: 10px; padding: 12px 14px; text-align: left;
}
.pt-info-note b { color: #facc15; }
.pt-info-note-ic { margin-right: 4px; }

/* ── Bütçe şeridi ── */
.pt-budget {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px;
  padding: 0 18px 12px;
}
.pt-bcell {
  display: flex; flex-direction: column; gap: 3px; align-items: center;
  padding: 8px 4px; border-radius: 10px;
  background: rgba(138, 160, 194, 0.06); border: 1px solid rgba(138, 160, 194, 0.09);
}
.pt-bl { font-size: 8.5px; font-weight: 700; letter-spacing: 0.4px; color: #64748b; text-transform: uppercase; }
.pt-bv { font-size: 15px; font-weight: 800; color: #e2e8f0; font-variant-numeric: tabular-nums; }
.pt-bv.pos { color: #4ade80; }
.pt-bv.neg { color: #f87171; }

/* ── Kadro gövdesi ── */
.pt-body {
  padding: 4px 18px 8px; overflow-y: auto; flex: 1 1 auto;
  -webkit-overflow-scrolling: touch;
}
.pt-secl {
  font-size: 9.5px; font-weight: 800; letter-spacing: 0.8px; color: #facc15;
  text-transform: uppercase; margin: 10px 0 8px;
}
.pt-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; }

.pt-slot {
  position: relative; display: flex; flex-direction: column; align-items: center;
  gap: 4px; padding: 9px 4px 7px; border-radius: 11px; cursor: pointer;
  background: #0f1a2e; border: 1px solid rgba(148, 163, 184, 0.12);
  transition: transform 0.12s, border-color 0.15s, background 0.15s;
  min-height: 86px; justify-content: center;
}
.pt-slot:hover { transform: translateY(-2px); border-color: rgba(250, 204, 21, 0.35); }
.pt-slot.removed { border-color: rgba(244, 113, 113, 0.5); background: rgba(244, 113, 113, 0.07); opacity: 0.85; }
.pt-slot.vacated { border-color: rgba(244, 113, 113, 0.4); border-style: dashed; background: rgba(244, 113, 113, 0.05); }
.pt-slot.added { border-color: rgba(74, 222, 128, 0.5); background: rgba(74, 222, 128, 0.08); }
.pt-slot.empty { border-style: dashed; border-color: rgba(148, 163, 184, 0.25); background: rgba(148, 163, 184, 0.03); }
.pt-slot.locked {
  cursor: not-allowed; opacity: 0.72;
  border-color: rgba(250, 204, 21, 0.28); background: rgba(250, 204, 21, 0.04);
}
.pt-slot.locked:hover { transform: none; }
.pt-lock-badge {
  position: absolute; top: -6px; left: 50%; transform: translateX(-50%);
  font-size: 7.5px; font-weight: 800; letter-spacing: 0.3px; white-space: nowrap; z-index: 2;
  padding: 2px 6px; border-radius: 10px;
  background: #facc15; color: #1a1505;
}
.pt-lock-ic { font-size: 11px; opacity: 0.8; line-height: 1; }

.pt-undo {
  position: absolute; top: -7px; right: -7px; z-index: 3;
  width: 22px; height: 22px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(15, 23, 42, 0.95); color: #cbd5e1; font-size: 11px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  transition: background 0.15s, color 0.15s;
}
.pt-undo:hover { background: #475569; color: #fff; }

.pt-badge {
  position: absolute; top: -6px; left: 50%; transform: translateX(-50%);
  font-size: 7.5px; font-weight: 800; letter-spacing: 0.4px;
  padding: 2px 6px; border-radius: 10px; white-space: nowrap; z-index: 2;
}
.pt-badge.rem { background: #f87171; color: #1a0606; }
.pt-badge.add { background: #4ade80; color: #052010; }
.pt-badge.rot { background: #38bdf8; color: #04141f; }
.pt-val.rot { color: #7dd3fc; }

.pt-logo { position: relative; width: 36px; height: 36px; flex-shrink: 0; }
.pt-logo.sm { width: 30px; height: 30px; }
.pt-logo-fb {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(37, 99, 235, 0.85); color: #fff; border-radius: 50%;
  font-weight: 900; font-size: 12px; z-index: 0;
}
.pt-logo img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain;
  background: rgba(255, 255, 255, 0.1); border-radius: 50%; padding: 3px; z-index: 1;
}
.pt-sym { font-size: 11px; font-weight: 800; color: #f1f5f9; }
.pt-val { font-size: 9.5px; font-weight: 700; color: #94a3b8; font-variant-numeric: tabular-nums; }
.pt-slot.removed .pt-val { color: #4ade80; }
.pt-slot.added .pt-val { color: #f87171; }

.pt-empty-ic { font-size: 22px; color: #475569; line-height: 1; }
.pt-empty-t { font-size: 9px; font-weight: 700; color: #64748b; }

/* ── Alt butonlar ── */
.pt-foot {
  display: flex; gap: 9px; padding: 12px 18px;
  border-top: 1px solid rgba(38, 52, 78, 0.6);
  padding-bottom: max(12px, env(safe-area-inset-bottom, 0px));
}
.pt-btn {
  flex: 1; padding: 12px; border-radius: 11px; font-size: 13px; font-weight: 800;
  cursor: pointer; border: none; transition: filter 0.15s, opacity 0.15s;
}
.pt-btn:disabled { opacity: 0.6; cursor: default; }
.pt-cancel { background: rgba(148, 163, 184, 0.14); color: #cbd5e1; }
.pt-cancel:hover:not(:disabled) { background: rgba(148, 163, 184, 0.22); }
.pt-save { background: linear-gradient(180deg, #facc15, #eab308); color: #1a1505; }
.pt-save:hover:not(:disabled) { filter: brightness(1.08); }
.pt-save.invalid {
  background: linear-gradient(180deg, #ef4444, #dc2626); color: #fff;
  cursor: not-allowed; opacity: 1;
}
.pt-save.invalid:disabled { opacity: 1; }   /* kırmızı net kalsın, soluklaşmasın */

/* ── Hisse arama (alt katman) ── */
.pt-search {
  position: absolute; inset: 0; z-index: 5;
  background: linear-gradient(180deg, #0e1828, #0a1220);
  display: flex; flex-direction: column;
  animation: ptSearchIn 0.2s ease;
}
@keyframes ptSearchIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.pt-search-head { display: flex; align-items: flex-start; justify-content: space-between; padding: 16px 18px 8px; }
.pt-search-title { font-size: 15px; font-weight: 800; color: #f8fafc; display: flex; flex-direction: column; gap: 2px; }
.pt-search-sub { font-size: 10.5px; font-weight: 600; color: #94a3b8; }
.pt-search-bar { padding: 0 18px 8px; }
.pt-search-bar input {
  width: 100%; box-sizing: border-box; padding: 11px 13px; border-radius: 10px; font-size: 13px;
  background: #0f1a2e; border: 1px solid rgba(148, 163, 184, 0.2); color: #f1f5f9; outline: none;
}
.pt-search-bar input:focus { border-color: rgba(250, 204, 21, 0.5); }
.pt-search-list { flex: 1; overflow-y: auto; padding: 4px 10px 16px; -webkit-overflow-scrolling: touch; }

.pt-search-row {
  display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: 11px;
  cursor: pointer; transition: background 0.12s; border: 1px solid transparent;
}
.pt-search-row:hover { background: rgba(250, 204, 21, 0.07); border-color: rgba(250, 204, 21, 0.18); }

.pt-sr-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }

/* Üst satır: kod + endeks + popülerlik + transfer değeri */
.pt-sr-top { display: flex; align-items: center; gap: 7px; }
.pt-sr-sym { font-size: 14px; font-weight: 800; color: #f1f5f9; letter-spacing: 0.02em; }
.pt-sr-fame { font-size: 10px; line-height: 1; }
.pt-sr-pop {
  font-size: 9.5px; font-weight: 800; color: #fb923c;
  background: rgba(251, 146, 60, 0.12); border: 1px solid rgba(251, 146, 60, 0.25);
  padding: 1px 6px; border-radius: 8px;
}
.pt-sr-cost {
  margin-left: auto; font-size: 14px; font-weight: 800; color: #facc15;
  font-variant-numeric: tabular-nums; flex-shrink: 0;
}

/* Performans satırı: H / A / Y + yetenek */
.pt-sr-perfrow { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.pt-sr-perf { font-size: 10.5px; font-weight: 700; color: #94a3b8; font-variant-numeric: tabular-nums; }
.pt-sr-perf i { font-style: normal; font-weight: 800; color: #64748b; margin-right: 2px; font-size: 9px; }
.pt-sr-perf.t-up { color: #4ade80; }
.pt-sr-perf.t-down { color: #f87171; }
.pt-sr-skill {
  margin-left: auto; font-size: 10px; font-weight: 800; color: #c4b5fd;
  background: rgba(167, 139, 250, 0.12); border: 1px solid rgba(167, 139, 250, 0.25);
  padding: 1px 7px; border-radius: 8px; flex-shrink: 0;
}

/* Değerleme satırı: F/K · PD/DD · FD/FAVÖK */
.pt-sr-valrow { display: flex; gap: 12px; font-size: 9.5px; color: #64748b; font-weight: 600; }
.pt-sr-valrow b { color: #cbd5e1; font-weight: 800; font-variant-numeric: tabular-nums; }

.pt-search-empty { text-align: center; color: #64748b; padding: 30px; font-size: 12px; }

/* ── Açılış butonu (kadro ekranında) ── */
.pt-launch {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 14px; border-radius: 11px; font-size: 12px; font-weight: 800;
  background: rgba(250, 204, 21, 0.12); border: 1px solid rgba(250, 204, 21, 0.3);
  color: #facc15; cursor: pointer; transition: background 0.15s;
}
.pt-launch:hover { background: rgba(250, 204, 21, 0.2); }

/* Sahada sağ üstte yüzen buton */
.pt-launch-floating {
  position: absolute; top: 10px; right: 10px; z-index: 60;
  width: 96px; height: 34px; box-sizing: border-box; justify-content: center;
  background: rgba(17, 28, 48, 0.92); border: 1px solid rgba(250, 204, 21, 0.4);
  backdrop-filter: blur(4px); box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
  padding: 0 6px; gap: 5px; font-size: 11px; white-space: nowrap;
}
.pt-launch-floating i { font-size: 13px; }
.pt-launch-floating:hover { background: rgba(30, 41, 59, 0.95); }

/* Mobil portrait butonu JS'te pg-court-host'a kendi stiliyle eklenir (bkz. mountButton). */

/* ── Mobil ── */
@media (max-width: 768px) {
  /* Alt menü (#pg-bottom-nav) yüksekliği: 60px + safe-area. Panel onun üstünde bitsin. */
  .pt-overlay {
    padding: 8px;
    /* Alt menü kadar boşluk bırak — panel altı arkada kalmasın */
    padding-bottom: calc(8px + 60px + env(safe-area-inset-bottom, 0px));
  }
  .pt-box {
    /* Üst + alt padding (8 + alt menü) düşülerek tam sığar */
    max-height: calc(100vh - 16px - 60px - env(safe-area-inset-bottom, 0px));
    border-radius: 14px;
  }
  .pt-budget { gap: 5px; padding: 0 12px 10px; }
  .pt-bv { font-size: 13px; }
  .pt-body { padding: 4px 12px 8px; }
  .pt-grid { gap: 5px; }
  .pt-slot { min-height: 78px; padding: 8px 3px 6px; }
  .pt-head, .pt-sub { padding-left: 14px; padding-right: 14px; }
  .pt-foot { padding-left: 14px; padding-right: 14px; }
}
