/* ==========================================================================
   Post-ad flow (ثبت آگهی)
   ========================================================================== */

/* ---- Step progress in the app bar ---- */
.step-bar {
  display: flex;
  align-items: center;
  gap: var(--s-1);
  padding: 0 var(--s-4) var(--s-3);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: var(--header-h);
  z-index: var(--z-sticky);
}

.step-seg {
  flex: 1;
  height: 3px;
  border-radius: var(--r-full);
  background: var(--surface-3);
  overflow: hidden;
}

.step-seg.is-done { background: var(--grad-gold); }

.step-seg.is-current::after {
  content: "";
  display: block;
  height: 100%;
  width: 55%;
  background: var(--grad-gold);
  border-radius: var(--r-full);
}

.step-caption {
  padding: var(--s-3) var(--s-4) 0;
  font-size: var(--fs-xs);
  color: var(--text-faint);
  font-weight: 600;
}

/* ---- Step 0: vehicle type chooser ---- */
.type-choose {
  padding: var(--s-6) var(--s-4);
}

.type-tiles {
  display: grid;
  gap: var(--s-3);
  margin-top: var(--s-6);
}

.type-tile {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--s-4);
  padding: var(--s-5) var(--s-4);
  border-radius: var(--r-lg);
  border: 1.5px solid var(--border);
  background:
    radial-gradient(120% 120% at 92% 0%, rgba(245, 166, 35, 0.14), transparent 60%),
    var(--surface);
  text-align: start;
  transition: all var(--dur-fast) var(--ease);
  overflow: hidden;
}

.type-tile:active { transform: scale(0.98); }

.type-tile.is-selected {
  border-color: var(--gold-1);
  box-shadow: var(--glow-gold);
}

.type-tile .tt-icon {
  width: 62px;
  height: 62px;
  border-radius: var(--r-md);
  background: var(--surface-2);
  display: grid;
  place-items: center;
  color: var(--gold-2);
  flex: none;
}

.type-tile.is-selected .tt-icon { background: var(--gold-soft); }
.type-tile .tt-name { font-size: var(--fs-lg); font-weight: 800; }
.type-tile .tt-desc { font-size: var(--fs-xs); color: var(--text-muted); }

.type-tile .tt-check {
  color: var(--gold-2);
  opacity: 0;
  transform: scale(0.6);
  transition: all var(--dur-fast) var(--ease-out);
  flex: none;
}

.type-tile.is-selected .tt-check { opacity: 1; transform: none; }

/* ---- Form page shell ---- */
.form-page {
  padding: var(--s-4) var(--s-4) var(--s-6);
}

.form-section-title {
  font-size: var(--fs-md);
  font-weight: 700;
  margin: var(--s-5) 0 var(--s-3);
}

.form-section-title:first-child { margin-top: 0; }

/* ---- AI assist banner (visual placeholder only — no backend this phase) ---- */
.ai-banner {
  display: flex;
  align-items: flex-start;
  gap: var(--s-3);
  padding: var(--s-3);
  border-radius: var(--r-md);
  background: linear-gradient(120deg, rgba(167, 108, 255, 0.16), rgba(255, 108, 182, 0.13));
  border: 1px solid rgba(167, 108, 255, 0.3);
  margin-bottom: var(--s-4);
}

.ai-banner .ai-ico {
  width: 34px;
  height: 34px;
  border-radius: var(--r-sm);
  background: linear-gradient(135deg, #a76cff, #ff6cb6);
  display: grid;
  place-items: center;
  color: #fff;
  flex: none;
}

.ai-banner .ai-text {
  font-size: var(--fs-xs);
  line-height: 1.9;
  color: var(--text-2);
}

.ai-banner .ai-title {
  font-weight: 700;
  color: #fff;
  font-size: var(--fs-sm);
  display: block;
}

/* ---- Image uploader ---- */
.uploader-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-2);
}

.up-tile {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
}

.up-tile .up-remove {
  position: absolute;
  top: 4px;
  inset-inline-end: 4px;
  width: 24px;
  height: 24px;
  border-radius: var(--r-full);
  background: rgba(13, 13, 15, 0.75);
  backdrop-filter: blur(6px);
  display: grid;
  place-items: center;
  color: #fff;
  z-index: 2;
}

.up-tile .up-cover-tag {
  position: absolute;
  bottom: 0;
  inset-inline: 0;
  padding: 3px;
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  background: var(--grad-gold);
  color: var(--on-gold);
  z-index: 2;
}

.up-add {
  aspect-ratio: 1;
  border-radius: var(--r-md);
  border: 1.5px dashed var(--border-strong);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--s-1);
  color: var(--text-muted);
  font-size: var(--fs-xs);
  font-weight: 600;
  transition: all var(--dur-fast);
}

.up-add:active {
  border-color: var(--gold-1);
  color: var(--gold-2);
}

.up-add .plus { color: var(--gold-2); }

/* Video tile (optional upload) */
.video-tile {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  width: 100%;
  padding: var(--s-4);
  border-radius: var(--r-md);
  border: 1.5px dashed var(--border-strong);
  background: var(--surface);
  text-align: start;
  color: var(--text-2);
}

.video-tile.has-video {
  border-style: solid;
  border-color: var(--gold-1);
  background: var(--gold-softer);
}

.video-tile .vt-ico {
  width: 44px;
  height: 44px;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  display: grid;
  place-items: center;
  color: var(--gold-2);
  flex: none;
}

.video-preview {
  overflow: hidden;
  border: 1px solid var(--gold-1);
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: 0 0 0 3px var(--gold-softer);
}

.video-preview video {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: #08080a;
}

.video-preview-meta {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-3);
  border-top: 1px solid var(--border);
}

.video-preview-meta .vt-ico {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: var(--r-sm);
  color: var(--success);
  background: var(--success-soft);
}

/* ---- Step 3 preview ---- */
.preview-wrap {
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--bg-elev);
}

.preview-flag {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  padding: var(--s-3) var(--s-4);
  background: var(--gold-soft);
  color: var(--gold-2);
  font-size: var(--fs-xs);
  font-weight: 700;
  border-bottom: 1px solid rgba(245, 166, 35, 0.24);
}

/* Read-only clone of the detail page inside the preview frame */
.preview-wrap .ld-gallery { aspect-ratio: 16 / 10; }
.preview-wrap .section + .section { border-top-width: 6px; }

.publish-note {
  font-size: var(--fs-xs);
  color: var(--text-faint);
  text-align: center;
  padding: var(--s-3) var(--s-4) 0;
  line-height: 1.9;
}
