/**
 * TFT skin yönetimi — panel token diline uyumlu modern kartlar + modal.
 * Created by: Copief
 * Developed by: Maki
 * Created: 2026-07-24
 */

.tft-page { display: grid; gap: 18px; }

.tft-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  border: 1px solid rgba(255, 122, 69, .22);
  border-radius: 20px;
  background:
    radial-gradient(120% 160% at 0% 0%, rgba(255, 122, 69, .14), transparent 48%),
    linear-gradient(180deg, rgba(24, 16, 12, .96), rgba(12, 8, 7, .98));
  box-shadow:
    0 18px 40px rgba(0, 0, 0, .28),
    inset 0 1px 0 rgba(255, 255, 255, .04);
}

.tft-cats {
  display: grid;
  gap: 12px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, .02);
}

.tft-cats-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.tft-cats-head h3 { margin: 0; font-size: 17px; }
.tft-cats-head .muted { margin: 4px 0 0; font-size: 12.5px; max-width: 52ch; }

.tft-cats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
}

.tft-cat-card {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
}

.tft-cat-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(255, 122, 69, .22);
  background: rgba(255, 122, 69, .08);
  color: #ff9a6b;
}
.tft-cat-icon img { width: 100%; height: 100%; object-fit: cover; }
.tft-cat-icon svg { width: 20px; height: 20px; }

.tft-cat-body { min-width: 0; }
.tft-cat-body h4 { margin: 0; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tft-cat-count { color: var(--dim); font-size: 11px; }
.tft-cat-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

.tft-cats-empty {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
  color: var(--dim);
  font-size: 13px;
  border: 1px dashed var(--line);
  border-radius: 12px;
}
.tft-cats-empty svg { width: 18px; height: 18px; opacity: .7; }

.tft-cat-tag {
  margin: 4px 0 0;
  color: #ff9a6b;
  font-size: 11px;
  font-weight: 650;
}

.tft-cat-select { display: grid; gap: 6px; margin: 4px 0 0; }
.tft-cat-preview {
  width: 64px;
  height: 64px;
  margin: 4px 0 10px;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(255, 122, 69, .28);
}
.tft-cat-preview img { width: 100%; height: 100%; object-fit: cover; }

.tft-drop--icon {
  min-height: 140px;
  margin-top: 4px;
}

.tft-hero-main {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  min-width: 0;
}

.tft-hero-ico {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #ff9a6b;
  background: rgba(255, 122, 69, .12);
  border: 1px solid rgba(255, 122, 69, .28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
  flex: 0 0 auto;
}

.tft-hero-ico svg { width: 24px; height: 24px; }
.tft-hero-kicker {
  margin: 0 0 4px;
  color: #ff9a6b;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .14em;
}
.tft-hero h2 { margin: 0; font-size: 22px; }
.tft-hero p { margin: 6px 0 0; color: var(--dim); font-size: 13px; line-height: 1.5; max-width: 58ch; }

.tft-hero-side {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}

.tft-summary {
  display: grid;
  min-width: 96px;
  padding: 10px 14px;
  border: 1px solid rgba(126, 226, 160, .22);
  border-radius: 14px;
  background: rgba(126, 226, 160, .06);
  text-align: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}
.tft-summary b {
  color: #7ee2a0;
  font-size: 22px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.tft-summary span { color: var(--dim); font-size: 11px; }

.tft-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
  align-items: stretch;
}

.tft-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  box-shadow:
    0 14px 32px rgba(0, 0, 0, .2),
    inset 0 1px 0 rgba(255, 255, 255, .04);
  transition: transform .18s ease, border-color .18s ease, box-shadow .2s ease;
}
.tft-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 122, 69, .35);
  box-shadow:
    0 20px 40px rgba(0, 0, 0, .26),
    0 0 24px -14px rgba(255, 122, 69, .35);
}
.tft-card.is-inactive { opacity: .72; filter: saturate(.78); }

.tft-preview {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 64 / 43;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(255, 122, 69, .12), rgba(91, 200, 245, .05));
}
.tft-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tft-preview-fallback {
  display: grid;
  place-items: center;
  color: #ff9a6b;
  opacity: .5;
}
.tft-preview-fallback svg { width: 48px; height: 48px; }

.tft-state {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(12, 14, 18, .86);
  border: 1px solid rgba(255, 255, 255, .08);
  color: var(--dim);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
}
.tft-state.on {
  color: #7ee2a0;
  border-color: rgba(126, 226, 160, .35);
  background: rgba(12, 28, 20, .88);
}

.tft-card-body {
  display: grid;
  gap: 12px;
  padding: 14px 15px 15px;
  flex: 1;
}
.tft-card-head { display: grid; gap: 4px; min-width: 0; }
.tft-card-body h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 750;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tft-en {
  margin: 0;
  color: var(--dim);
  font-size: 11.5px;
  line-height: 1.35;
}
.tft-en i {
  font-style: normal;
  font-weight: 800;
  font-size: 9px;
  letter-spacing: .06em;
  color: #7ec8ff;
  margin-right: 4px;
}

.tft-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  color: var(--dim);
  font-size: 11px;
}
.tft-meta code {
  color: #7ec8ff;
  font-size: 10.5px;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(126, 200, 255, .08);
  border: 1px solid rgba(126, 200, 255, .14);
}
.tft-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: auto;
}

.tft-empty {
  min-height: 230px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  border: 1px dashed var(--line);
  border-radius: 18px;
  color: var(--dim);
  background: rgba(255, 255, 255, .015);
}
.tft-empty svg { width: 44px; height: 44px; color: #ff9a6b; }

/* ── Modal ─────────────────────────────────────────────── */
.tft-modal-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}
.tft-modal-head h3 { margin: 0 0 4px; }
.tft-modal-head .muted { margin: 0; }
.tft-modal-ico {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #ff9a6b;
  background: rgba(255, 122, 69, .12);
  border: 1px solid rgba(255, 122, 69, .28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
}
.tft-modal-ico svg { width: 20px; height: 20px; }

.tft-form-grid,
.tft-file-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.tft-form-grid .rw-label em {
  margin-left: 6px;
  font-style: normal;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .08em;
  color: #7ec8ff;
  vertical-align: middle;
}

.tft-switch {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 12px 0 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, .02);
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease;
}
.tft-switch:hover {
  border-color: rgba(126, 226, 160, .28);
  background: rgba(126, 226, 160, .04);
}
.tft-switch input { position: absolute; opacity: 0; pointer-events: none; }
.tft-switch-ui {
  position: relative;
  width: 46px;
  height: 26px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .12);
  transition: background .18s ease, border-color .18s ease;
}
.tft-switch-ui::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .35);
  transition: transform .18s ease;
}
.tft-switch input:checked + .tft-switch-ui {
  background: rgba(126, 226, 160, .35);
  border-color: rgba(126, 226, 160, .55);
}
.tft-switch input:checked + .tft-switch-ui::after { transform: translateX(20px); }
.tft-switch-copy { display: grid; gap: 3px; min-width: 0; }
.tft-switch-copy b { font-size: 13px; }
.tft-switch-copy small { color: var(--dim); font-size: 11.5px; line-height: 1.4; }

.tft-drop {
  min-height: 168px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 6px;
  padding: 18px 16px;
  border: 1.5px dashed rgba(255, 122, 69, .35);
  border-radius: 16px;
  background: rgba(255, 122, 69, .04);
  text-align: center;
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, box-shadow .18s ease;
}
.tft-drop:hover,
.tft-drop.is-drag {
  border-color: #ff9a6b;
  background: rgba(255, 122, 69, .1);
  box-shadow: 0 0 0 3px rgba(255, 122, 69, .08);
}
.tft-drop.has-file {
  border-style: solid;
  border-color: rgba(126, 226, 160, .42);
  background: rgba(126, 226, 160, .06);
}
.tft-drop--archive {
  border-color: rgba(126, 200, 255, .3);
  background: rgba(126, 200, 255, .03);
}
.tft-drop--archive:hover,
.tft-drop--archive.is-drag {
  border-color: #7ec8ff;
  background: rgba(126, 200, 255, .08);
  box-shadow: 0 0 0 3px rgba(126, 200, 255, .08);
}
.tft-drop--archive.has-file {
  border-color: rgba(126, 200, 255, .45);
  background: rgba(126, 200, 255, .07);
}
.tft-drop-ico {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  color: #ff9a6b;
  background: rgba(255, 122, 69, .1);
  border: 1px solid rgba(255, 122, 69, .22);
  margin-bottom: 2px;
}
.tft-drop--archive .tft-drop-ico {
  color: #7ec8ff;
  background: rgba(126, 200, 255, .1);
  border-color: rgba(126, 200, 255, .22);
}
.tft-drop-ico svg { width: 20px; height: 20px; }
.tft-drop b { font-size: 13px; }
.tft-drop > small {
  color: var(--dim);
  font-size: 11px;
  line-height: 1.35;
  max-width: 28ch;
}
.tft-drop-name {
  margin-top: 2px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0 8px;
  color: var(--muted, var(--text));
  font-size: 11.5px;
  font-weight: 650;
  font-style: normal;
}
.tft-drop-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 9px;
  border: 1px solid rgba(255, 122, 69, .35);
  color: #ffd2ba;
  background: rgba(255, 122, 69, .12);
  font-size: 11.5px;
  font-weight: 700;
  pointer-events: none;
}
.tft-drop-btn svg { width: 13px; height: 13px; color: currentColor; }
.tft-drop--archive .tft-drop-btn {
  border-color: rgba(126, 200, 255, .35);
  color: #b8e4ff;
  background: rgba(126, 200, 255, .1);
}

/* Clienthemes hazır tema — galeri dropzone (çoklu) + açıklama alanı */
.ctp-desc-field {
  display: grid;
  gap: 6px;
  margin: 12px 0 0;
}
.tft-drop--gallery {
  margin-top: 12px;
  min-height: 132px;
  border-color: rgba(255, 184, 108, .32);
  background: rgba(255, 184, 108, .035);
}
.tft-drop--gallery:hover,
.tft-drop--gallery.is-drag {
  border-color: #ffb86c;
  background: rgba(255, 184, 108, .09);
  box-shadow: 0 0 0 3px rgba(255, 184, 108, .08);
}
.tft-drop--gallery.has-file {
  border-style: solid;
  border-color: rgba(126, 226, 160, .42);
  background: rgba(126, 226, 160, .06);
}
.tft-drop--gallery .tft-drop-ico {
  color: #ffb86c;
  background: rgba(255, 184, 108, .1);
  border-color: rgba(255, 184, 108, .24);
}
.tft-drop--gallery .tft-drop-btn {
  border-color: rgba(255, 184, 108, .35);
  color: #ffe0b8;
  background: rgba(255, 184, 108, .12);
}

@media (max-width: 860px) {
  .tft-hero { flex-direction: column; align-items: stretch; }
  .tft-hero-side { justify-content: space-between; }
  .tft-cats-head { flex-direction: column; align-items: stretch; }
  .tft-cat-card { grid-template-columns: 44px 1fr; }
  .tft-cat-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .tft-form-grid,
  .tft-file-grid { grid-template-columns: 1fr; }
  .tft-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .tft-card,
  .tft-drop,
  .tft-switch,
  .tft-switch-ui,
  .tft-switch-ui::after { transition: none; }
}
