/* ============================================================
   FORM.CSS — Advertiser form page styles
   ============================================================ */

/* ── LAYOUT ── */
.form-container {
  max-width: 760px;
  margin: 0 auto;
}

/* ── INTRO ── */
.form-intro {
  margin-bottom: 40px;
}

.form-title {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.form-subtitle {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ── FORM SECTIONS ── */
.form-section {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 20px;
}

.section-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
}

.section-num {
  font-size: 11px;
  font-weight: 800;
  color: var(--orange);
  letter-spacing: 0.1em;
  background: var(--orange-glow);
  border: 1px solid rgba(245, 166, 35, 0.3);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  margin-top: 2px;
}

.section-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 3px;
}

.section-desc {
  font-size: 13px;
  color: var(--text-muted);
}

/* ── FIELDS GRID ── */
.fields-grid {
  display: grid;
  gap: 16px;
}

.fields-grid.two-col {
  grid-template-columns: 1fr 1fr;
}

.full-width {
  grid-column: 1 / -1;
}

/* ── ZONE PICKER ── */
.zone-picker {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  align-items: start;
}

/* Labels, errors, and the full-screen takeover span the full width;
   the four 4-zone cards pair up two-per-row. */
.zone-picker > .field-label,
.zone-picker > .field-error,
.zone-picker > .zone-group-label,
.zone-picker > .zone-card[data-zone="fullscreen"] {
  grid-column: 1 / -1;
}

.zone-group-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.zone-card {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  user-select: none;
}

.zone-card:hover {
  border-color: rgba(245, 166, 35, 0.4);
  background: var(--bg-hover);
}

.zone-card.selected {
  border-color: var(--orange);
  background: var(--orange-glow);
}

.zone-card.unavailable {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.zone-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.zone-card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.zone-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.zone-dims {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-input);
  padding: 2px 8px;
  border-radius: 4px;
  font-family: 'SF Mono', 'Fira Code', monospace;
}

.zone-card-check {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  flex-shrink: 0;
}

.zone-card.selected .zone-card-check {
  background: var(--orange);
  border-color: var(--orange);
}

.checkmark {
  font-size: 11px;
  color: transparent;
  font-weight: 900;
}

.zone-card.selected .checkmark {
  color: #1A1B26;
}

/* ── ZONE PREVIEWS ──
   Every preview is a true 1920×1080 (16:9) screen, drawn at the same scale.
   Sub-zones use the exact proportions of the real CMS layout:
     columns  1468 : 452   (Main Feature : right column)
     rows      840 : 240   (top region : Bottom Banner)
     right col 540 : 300   (Top Right : Small Box)
*/
.zone-preview {
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 10px;
  width: 100%;
  max-width: 420px;
  aspect-ratio: 1920 / 1080;
}

/* Fullscreen preview */
.fullscreen-preview {
  background: var(--bg-input);
  border: 1px solid var(--border);
  padding: 2px;
}

.preview-zone-full {
  width: 100%;
  height: 100%;
  background: rgba(245, 166, 35, 0.2);
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--orange);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.zone-card.selected .preview-zone-full {
  background: rgba(245, 166, 35, 0.35);
}

/* 4-Zone preview layout */
.fourzone-preview {
  background: var(--bg-input);
  border: 1px solid var(--border);
  display: grid;
  grid-template-columns: 1468fr 452fr;
  grid-template-rows: 840fr 240fr;
  gap: 2px;
  padding: 2px;
}

.fz-main {
  grid-column: 1;
  grid-row: 1;
  background: rgba(255,255,255,0.04);
  border-radius: 2px;
}

.fz-right {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.fz-topright {
  flex: 540 0 0;
  background: rgba(255,255,255,0.04);
  border-radius: 2px;
}

.fz-smallbox {
  flex: 300 0 0;
  background: rgba(255,255,255,0.04);
  border-radius: 2px;
}

.fz-bottom {
  grid-column: 1 / -1;
  grid-row: 2;
  background: rgba(255,255,255,0.04);
  border-radius: 2px;
}

/* Highlighted zone */
.fz-highlight {
  background: rgba(245, 166, 35, 0.25) !important;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--orange);
  letter-spacing: 0.04em;
  text-align: center;
}

.zone-card.selected .fz-highlight {
  background: rgba(245, 166, 35, 0.45) !important;
}

/* ── ZONE AVAILABILITY ── */
.zone-availability {
  font-size: 11px;
  color: var(--text-dim);
  min-height: 14px;
}

.zone-availability.has-conflict {
  color: var(--red);
}

/* ── AVAILABILITY NOTICE ── */
.availability-notice {
  background: var(--yellow-bg);
  border: 1px solid rgba(245, 166, 35, 0.3);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 13px;
  color: var(--yellow);
  margin-bottom: 16px;
}

/* ── UPLOAD AREA ── */
.upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius-md);
  padding: 40px 24px;
  text-align: center;
  transition: border-color 0.15s, background 0.15s;
  cursor: pointer;
}

.upload-area:hover,
.upload-area.dragover {
  border-color: var(--orange);
  background: var(--orange-glow);
}

.upload-icon {
  font-size: 28px;
  margin-bottom: 10px;
  color: var(--text-muted);
}

.upload-label {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.upload-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.upload-browse {
  color: var(--orange);
  cursor: pointer;
  text-decoration: underline;
}

.upload-formats {
  font-size: 11px;
  color: var(--text-dim);
}

/* ── FILE PREVIEW ── */
.file-preview {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
}

.file-preview-icon { font-size: 22px; }

.file-preview-info { flex: 1; }

.file-preview-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.file-preview-meta {
  font-size: 11px;
  color: var(--text-muted);
}

.file-preview-remove {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 16px;
  cursor: pointer;
  padding: 4px;
  transition: color 0.15s;
}

.file-preview-remove:hover { color: var(--red); }

/* ── DIMENSION HINT & ERROR ── */
.dimension-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 8px;
  padding: 8px 12px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--orange);
}

.dimension-error {
  font-size: 12px;
  color: var(--red);
  margin-top: 8px;
  padding: 8px 12px;
  background: var(--red-bg);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--red);
}

/* ── SUBMIT ROW ── */
.form-submit-row {
  display: flex;
  justify-content: flex-end;
  padding: 8px 0 40px;
}

/* ── SUCCESS STATE ── */
.success-state {
  text-align: center;
  padding: 80px 32px;
}

.success-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--green-bg);
  border: 2px solid var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  color: var(--green);
  margin: 0 auto 24px;
}

.success-title {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 12px;
}

.success-body {
  font-size: 15px;
  color: var(--text-muted);
  max-width: 420px;
  margin: 0 auto 28px;
  line-height: 1.7;
}

/* ── RESPONSIVE ── */
@media (max-width: 600px) {
  .fields-grid.two-col {
    grid-template-columns: 1fr;
  }
  .main { padding: 24px 16px; }
  .form-section { padding: 20px; }
  .header-inner { padding: 0 16px; }
  .zone-picker { grid-template-columns: 1fr; }
}
