/* =====================================================
   DIJITAL DENEYIM — components.css
   Reusable UI Components
   ===================================================== */

/* ---- Empty State ---- */
.empty {
  padding: 48px 24px;
  border: 1px dashed var(--line2);
  border-radius: 18px;
  color: var(--muted);
  text-align: center;
  font-size: 15px;
}
.empty .empty-icon { font-size: 40px; margin-bottom: 10px; }

/* ---- Progress Bar ---- */
.progress-bar {
  height: 10px;
  background: var(--line);
  border-radius: 999px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--gold2));
  border-radius: 999px;
  transition: width .5s ease;
}
.progress-fill.green { background: linear-gradient(90deg, var(--green), #7fffff); }

/* ---- Step Progress ---- */
.step-progress {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 28px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.step-progress-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  position: relative;
  flex: 1;
  min-width: 60px;
}
.step-progress-item:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 13px;
  left: 50%;
  width: 100%;
  height: 2px;
  background: var(--line2);
  z-index: 0;
}
.step-progress-item.done:not(:last-child)::after { background: var(--green); }
.step-progress-item.active:not(:last-child)::after { background: linear-gradient(90deg, var(--gold), var(--line2)); }
.sp-circle {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: var(--line);
  border: 2px solid var(--line2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  position: relative;
  z-index: 1;
  transition: .25s;
}
.step-progress-item.active .sp-circle { background: var(--gold); border-color: var(--gold); color: #130d05; }
.step-progress-item.done .sp-circle { background: var(--green); border-color: var(--green); color: #0a1f14; }
.sp-label { font-size: 10px; color: var(--muted); text-align: center; white-space: nowrap; }
.step-progress-item.active .sp-label { color: var(--gold2); font-weight: 700; }

/* ---- Category Cards (wizard) ---- */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 10px;
}
/* Eski .cat-card sınıfı geriye dönük uyumluluk */
.cat-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px 12px;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, background .2s, transform .2s;
}
.cat-card:hover { border-color: rgba(215,174,91,.4); transform: translateY(-2px); }
.cat-card.selected { border-color: var(--gold); background: rgba(215,174,91,.12); }
.cat-card .cat-emoji { font-size: 30px; display: block; margin-bottom: 6px; }
.cat-card .cat-name  { font-size: 12px; font-weight: 700; color: var(--muted); }
.cat-card.selected .cat-name { color: var(--gold2); }

/* Yeni wizard kategori kartı */
.cat-card-wiz {
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  border: 2.5px solid transparent;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,.18);
}
.cat-card-wiz:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(0,0,0,.28);
}
.cat-card-wiz:hover .ccw-img img {
  transform: scale(1.1);
}
.cat-card-wiz.wiz-sel {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(215,174,91,.3), 0 6px 20px rgba(0,0,0,.3);
  transform: translateY(-2px) scale(1.03);
}
.cat-card-wiz.wiz-sel .ccw-label {
  color: var(--gold2) !important;
}
/* Photo image wrapper */
.ccw-img {
  height: 56px;
  border-radius: 14px 14px 0 0;
  position: relative;
  overflow: hidden;
  background: #1a1a2e;
}
.ccw-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s ease;
}
.ccw-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,.05) 0%, rgba(0,0,0,.5) 100%);
  pointer-events: none;
  z-index: 1;
}
.ccw-emoji {
  position: absolute;
  top: 4px;
  right: 4px;
  font-size: 13px;
  background: rgba(255,255,255,.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 6px;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  border: 1px solid rgba(255,255,255,.25);
  line-height: 1;
}
.ccw-label {
  padding: 5px 4px 7px;
  text-align: center;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--muted);
  background: var(--card);
  transition: color .18s;
}

/* ---- Theme Picker ---- */
.theme-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.theme-swatch {
  border-radius: 14px;
  height: 96px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color .2s, transform .18s, box-shadow .18s;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 7px 7px 6px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,.22);
  position: relative;
}
.theme-swatch::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 30%, rgba(0,0,0,.45) 100%);
  pointer-events: none;
}
.theme-swatch:hover { transform: scale(1.04); box-shadow: 0 5px 16px rgba(0,0,0,.35); }
.theme-swatch.selected { box-shadow: 0 0 0 2px #d7ae5b, 0 5px 18px rgba(0,0,0,.4); }
.ts-dot {
  width: 7px; height: 7px; border-radius: 50%;
  display: block; margin-bottom: 4px;
  box-shadow: 0 0 6px currentColor;
  position: relative; z-index: 1;
}
.ts-lbl {
  font-size: 9px; font-weight: 700;
  color: rgba(255,255,255,.9);
  line-height: 1.2;
  display: block;
  position: relative; z-index: 1;
  text-shadow: 0 1px 3px rgba(0,0,0,.6);
}

/* ---- Template Grid ---- */
.template-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.template-card {
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color .2s, transform .2s;
  aspect-ratio: .65;
  position: relative;
}
.template-card:hover { transform: scale(1.02); border-color: var(--line2); }
.template-card.selected { border-color: var(--gold); }
.template-card .tc-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0,0,0,.7);
  padding: 6px;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  color: #fff;
}

/* ---- Music / Effect Selector ---- */
.option-list { display: flex; flex-direction: column; gap: 8px; }
.option-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
.option-item:hover { border-color: var(--line2); background: rgba(255,255,255,.03); }
.option-item.selected { border-color: var(--gold); background: rgba(215,174,91,.08); }
.option-icon { font-size: 22px; flex-shrink: 0; }
.option-label { font-size: 14px; font-weight: 600; }
.option-item.selected .option-label { color: var(--gold2); }
.option-check {
  margin-left: auto;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  border: 2px solid var(--line2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  flex-shrink: 0;
}
.option-item.selected .option-check { background: var(--gold); border-color: var(--gold); color: #130d05; }

/* ---- Countdown Timer ---- */
.countdown-box {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
}
.countdown-unit {
  background: var(--card2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 14px;
  text-align: center;
  min-width: 56px;
}
.countdown-num { font-size: 24px; font-weight: 900; color: var(--gold2); display: block; }
.countdown-lbl { font-size: 10px; color: var(--muted); }
.countdown-sep { font-size: 22px; font-weight: 900; color: var(--gold); margin-bottom: 14px; }

/* ---- Image Preview Card ---- */
.img-preview-wrap {
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 16/9;
  background: var(--card2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 13px;
}
.img-preview-wrap img { width: 100%; height: 100%; object-fit: cover; }

/* ---- Share Panel ---- */
.share-panel { display: flex; flex-direction: column; gap: 10px; }
.share-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  transition: background .2s, border-color .2s;
  text-decoration: none;
}
.share-btn:hover { background: rgba(255,255,255,.04); border-color: var(--line2); }
.share-btn.wa { border-color: rgba(37,211,102,.3); }
.share-btn.wa:hover { background: rgba(37,211,102,.08); }
.share-btn.ig { border-color: rgba(225,48,108,.3); }
.share-btn.ig:hover { background: rgba(225,48,108,.08); }
.share-icon { font-size: 22px; }
.share-copy { background: rgba(215,174,91,.08); border-color: rgba(215,174,91,.25); }
.share-copy:hover { background: rgba(215,174,91,.14); }

/* ---- QR Card ---- */
.qr-card {
  background: #fff;
  border-radius: 20px;
  padding: 16px;
  display: inline-block;
  box-shadow: 0 8px 24px rgba(0,0,0,.15);
}

/* ---- Mini Phone Preview ---- */
.mini-phone {
  width: 140px;
  height: 280px;
  border-radius: 28px;
  background: linear-gradient(145deg, #221e30, #0e0c14);
  border: 1px solid rgba(255,255,255,.14);
  padding: 10px;
  margin: auto;
  box-shadow: 0 16px 50px rgba(0,0,0,.45);
  overflow: hidden;
}
.mini-phone-screen {
  border-radius: 20px;
  height: 100%;
  overflow: hidden;
  position: relative;
}

/* ---- Info Banner ---- */
.info-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(79,195,247,.08);
  border: 1px solid rgba(79,195,247,.2);
  font-size: 13px;
  color: var(--text2);
  line-height: 1.5;
}
.info-banner .ib-icon { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.info-banner.gold { background: rgba(215,174,91,.08); border-color: rgba(215,174,91,.2); }
.info-banner.green { background: rgba(70,211,154,.08); border-color: rgba(70,211,154,.2); }
.info-banner.red { background: rgba(255,90,105,.08); border-color: rgba(255,90,105,.2); }

/* ---- Tab Navigation ---- */
.tab-nav {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0;
  margin-bottom: 20px;
}
.tab-btn {
  padding: 10px 16px;
  border: none;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color .2s, border-color .2s;
  border-radius: 0;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--gold2); border-bottom-color: var(--gold); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ---- Action Bar ---- */
.action-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  /* Sticky alt bar — Devam/Geri her ekranda görünür, altta gömülü kalmaz */
  position: sticky;
  bottom: 0;
  z-index: 20;
  background: var(--bg, #09080d);
  margin-top: 16px;
  padding: 14px 0 16px;
  border-top: 1px solid var(--line);
}

/* ---- Pagination ---- */
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 20px; }
.page-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: none;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  transition: .2s;
}
.page-btn:hover, .page-btn.active { background: rgba(215,174,91,.12); border-color: var(--gold); color: var(--gold2); }

/* ---- Admin stats mini chart placeholder ---- */
.mini-chart {
  height: 60px;
  background: linear-gradient(90deg, transparent, rgba(215,174,91,.15));
  border-radius: 10px;
  position: relative;
  overflow: hidden;
}
.mini-chart::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40%;
  background: linear-gradient(0deg, rgba(215,174,91,.12), transparent);
}

/* ---- Toggle Switch ---- */
.toggle-wrap { display: flex; align-items: center; gap: 10px; }
.toggle {
  position: relative;
  width: 46px;
  height: 26px;
  flex-shrink: 0;
}
.toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle-slider {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: var(--line2);
  cursor: pointer;
  transition: .3s;
}
.toggle-slider::before {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #fff;
  left: 3px;
  top: 3px;
  transition: .3s;
}
.toggle input:checked + .toggle-slider { background: var(--gold); }
.toggle input:checked + .toggle-slider::before { transform: translateX(20px); }
.toggle-label { font-size: 14px; font-weight: 600; }

/* ---- Opening Anim Selector ---- */
.open-anim-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 4px;
}
.open-anim-item {
  border: 2px solid var(--line);
  border-radius: 14px;
  padding: 10px 6px;
  text-align: center;
  cursor: pointer;
  transition: border-color .18s, background .18s, transform .18s;
  background: var(--card);
}
.open-anim-item:hover { border-color: rgba(215,174,91,.4); transform: translateY(-2px); }
.open-anim-item.oai-sel { border-color: var(--gold); background: rgba(215,174,91,.1); }
