/* ═══════════════════════════════════════════
   DİKİM.AI — Tryon Sayfasına Özel Stiller
   Ortak stiller (topbar, side-rail, butonlar,
   tema, toast, modal, vb.) style.css'ten gelir.
   Bu dosya yalnızca tryon.html'e özgü bileşenleri
   barındırır.
   ═══════════════════════════════════════════ */

/* ── Main alan — tryon'da daha geniş padding ve blok düzeni ── */
.tryon-page .main {
  padding: 26px 36px 80px;
  display: block;
}

/* ── Workshop ızgarası — 3 sütun ─────────── */
.workshop-grid {
  display: grid;
  grid-template-columns: minmax(340px, 1.3fr) minmax(420px, 1.7fr) minmax(280px, 1fr);
  column-gap: 48px;
  row-gap: 40px;
  align-items: start;
  max-width: 1900px;
}
@media (max-width: 1040px) {
  .workshop-grid { grid-template-columns: 1fr; }
}

/* ── Panel override — tryon panelleri içerik bölümleri ── */
.tryon-page .panel {
  width: auto;
  flex-shrink: initial;
  display: block;
  overflow: visible;
  height: auto;
  padding: 20px 22px;
}

/* ── Bölüm başlıkları ─────────────────────── */
.section-hd {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.section-num {
  font-family: var(--f-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
}
.section-title {
  font-family: var(--f-body);
  font-weight: 600;
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: .05em;
}

/* ── 1. Model listesi — katalog ızgarası ──── */
.model-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
  gap: 10px;
  max-height: 640px;
  overflow-y: auto;
  align-content: start;
}
.model-card {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 8px;
  cursor: pointer;
  background: var(--surface);
}
.model-card:hover { border-color: var(--text-2); }
.model-card.selected { border-color: var(--accent); background: var(--surface2); }
.model-card-check {
  position: absolute; top: 6px; right: 6px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 10px;
}
.model-card-thumb {
  width: 100%; aspect-ratio: 3/4;
  border-radius: 2px;
  object-fit: cover;
  background: var(--surface2);
  margin-bottom: 6px;
}
.model-card-name {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.model-card-desc {
  font-size: 10.5px;
  color: var(--text-2);
  line-height: 1.35;
  margin-top: 2px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.model-card-meta {
  display: flex;
  justify-content: space-between;
  font-family: var(--f-mono);
  font-size: 9.5px;
  color: var(--text-2);
  border-top: 1px dotted var(--border);
  margin-top: 6px;
  padding-top: 5px;
}

.panel-footnote {
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--text-2);
  margin-top: 14px;
  line-height: 1.6;
}

/* ── 2. Dropzone override — tryon'da kendi bordürü var ── */
.tryon-page .dropzone {
  border: 1.5px dashed var(--border);
  border-radius: var(--r);
  margin-bottom: 16px;
}
.dropzone--full { min-height: 360px; }
.dropzone.drag-over { border-color: var(--accent); background: rgba(46,139,111,.05); }

/* tryon'daki dz-icon metin karakteri (▢), index'teki SVG — override */
.tryon-page .dz-icon {
  width: auto;
  height: auto;
  font-family: var(--f-body);
  font-size: 26px;
  color: var(--text-2);
  margin-bottom: 10px;
}
.tryon-page .dz-title {
  margin: 0 auto 16px;
}

/* ── Ürün önizleme ────────────────────────── */
#garmentPreviewWrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
#garmentPreview {
  max-width: 100%;
  max-height: 250px;
  border-radius: var(--r);
  object-fit: contain;
}

/* ── Açıklama kutusu ──────────────────────── */
.explain-box {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 12px 14px;
  margin-bottom: 16px;
}
.explain-hd {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 6px;
}
.explain-box p {
  font-size: 12.5px;
  color: var(--text-2);
  line-height: 1.5;
}

/* ── Maliyet çubuğu ──────────────────────── */
.cost-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  border-top: 1px solid var(--border);
  padding-top: 18px;
}
.cost-formula { font-size: 13px; color: var(--text-2); }
.cost-formula strong { color: var(--text); font-family: var(--f-mono); font-weight: 600; }
.cost-total { color: var(--accent) !important; }

/* ── 3. Çıktı listesi ─────────────────────── */
.output-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 640px;
  overflow-y: auto;
}
.output-card {
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 10px;
  background: var(--surface);
}
.output-card-thumb {
  width: 100%; aspect-ratio: 3/4;
  border-radius: 2px;
  object-fit: cover;
  background: var(--surface2);
  margin-bottom: 8px;
  display: flex; align-items: center; justify-content: center;
}
.output-card-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 2px;
}
.output-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--f-mono);
  font-size: 10.5px;
}
.output-status { color: var(--text-2); }
.output-status--ready  { color: var(--success); }
.output-status--failed { color: var(--error); }
.output-card a { color: var(--accent); text-decoration: none; }
.output-card a:hover { text-decoration: underline; }
.output-card-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}
.output-card-links {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  font-family: var(--f-mono);
  font-size: 10.5px;
}
.output-regenerate-btn {
  background: none;
  border: none;
  padding: 0;
  color: var(--accent);
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
}
.output-regenerate-btn:hover { text-decoration: underline; }
.output-send-row {
  display: flex;
  gap: 8px;
}
.output-send-btn {
  flex: 1;
  background: var(--accent);
  color: var(--on-accent);
  border: none;
  border-radius: var(--r);
  padding: 8px 6px;
  font-family: var(--f-body);
  font-weight: 600;
  font-size: 11.5px;
  cursor: pointer;
}
.output-send-btn:hover { opacity: .9; }
.output-send-btn:disabled { opacity: .5; cursor: default; }

/* ── Spinner (küçük — çıktı kartları) ────── */
.spinner-ring-sm {
  width: 18px; height: 18px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@media (prefers-reduced-motion: reduce) {
  .spinner-ring-sm { animation-duration: 1.6s; }
}

/* ── Etiket Editörü overlay'i ─────────────── */
.label-editor-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.label-editor-box {
  width: min(1400px, 96vw);
  height: min(880px, 90vh);
  background: var(--bg);
  border-radius: var(--r-l);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: slideUp .18s ease;
}
.label-editor-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.label-editor-box .result-state {
  flex: 1;
  min-height: 0;
  padding: 16px;
}
/* .tryon-page .panel override (workshop ızgarası için) burada geçersiz —
   etiket editörü bg-remover'daki sabit-genişlikli paneli aynen kullanır */
.label-editor-box .panel {
  width: var(--panel-w);
  flex-shrink: 0;
  display: flex;
  overflow: hidden;
  height: 100%;
  padding: 0;
}

/* ── Çıktı kartı — etiketle butonu ────────── */
.output-label-btn {
  display: block;
  width: 100%;
  background: var(--surface2);
  color: var(--text);
  border: 1px solid var(--border2);
  border-radius: var(--r);
  padding: 7px 6px;
  font-family: var(--f-body);
  font-weight: 600;
  font-size: 11.5px;
  cursor: pointer;
}
.output-label-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ── Responsive ──────────────────────────── */
@media (max-width: 768px) {
  .tryon-page .main {
    padding: 16px 12px;
  }
}
