/* ============================================================
   EZ TRIBUTE — Event Creation Wizard Styles
   ============================================================ */

/* ── Wizard shell ───────────────────────────────────────────── */
.wizard-container {
  max-width: 860px;
  margin: 0 auto;
  padding: 32px 24px 48px;
  min-height: calc(100vh - 64px);
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* ── Progress bar ───────────────────────────────────────────── */
.wizard-progress {
  margin-bottom: 36px;
}

.progress-steps {
  display: flex;
  align-items: center;
  gap: 0;
  overflow-x: auto;
  padding-bottom: 8px;
}

.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  min-width: 72px;
  position: relative;
}

.progress-step::after {
  content: '';
  position: absolute;
  top: 16px;
  left: 50%;
  width: 100%;
  height: 2px;
  background: var(--tan);
  z-index: 0;
}
.progress-step:last-child::after { display: none; }

.step-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--tan);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  z-index: 1;
  position: relative;
  transition: var(--trans);
}

.progress-step.active .step-dot  { background: var(--gold); color: var(--brown); }
.progress-step.done .step-dot    { background: var(--brown); }
.progress-step.done::after       { background: var(--brown); }

.step-label {
  font-size: 0.7rem;
  color: var(--gray);
  margin-top: 6px;
  text-align: center;
  white-space: nowrap;
}
.progress-step.active .step-label { color: var(--gold); font-weight: 600; }
.progress-step.done .step-label   { color: var(--brown); }

/* ── Wizard body ────────────────────────────────────────────── */
.wizard-body {
  flex: 1;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 40px 36px;
}

.wizard-step-title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--brown);
  margin-bottom: 6px;
}

.wizard-step-sub {
  color: var(--gray);
  font-size: 0.9rem;
  margin-bottom: 32px;
  line-height: 1.5;
}

/* ── Form sections inside wizard ────────────────────────────── */
.form-section {
  border-top: 1px solid var(--tan-lt);
  padding-top: 24px;
  margin-top: 24px;
}

.form-section:first-child { border-top: none; padding-top: 0; margin-top: 0; }

.form-section h4 {
  font-family: var(--font-serif);
  font-size: 1rem;
  color: var(--brown);
  margin-bottom: 16px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-row.three-col { grid-template-columns: 1fr 1fr 1fr; }

/* ── Photo grid / uploader ──────────────────────────────────── */
.photo-upload-area {
  border: 2px dashed var(--tan);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  cursor: pointer;
  transition: var(--trans);
  margin-bottom: 16px;
}
.photo-upload-area:hover { border-color: var(--gold); background: var(--tan-lt); }
.photo-upload-area p { color: var(--gray); font-size: 0.9rem; }
.photo-upload-area .upload-icon { font-size: 2rem; margin-bottom: 8px; display: block; }

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.photo-thumb {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 1;
  background: var(--tan-lt);
}

.photo-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.photo-thumb .remove-btn {
  position: absolute;
  top: 4px; right: 4px;
  background: rgba(0,0,0,0.6);
  color: white;
  border: none;
  width: 24px; height: 24px;
  border-radius: 50%;
  font-size: 0.75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Audio uploader ─────────────────────────────────────────── */
.audio-upload-area {
  border: 2px dashed var(--tan);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: var(--trans);
}
.audio-upload-area:hover { border-color: var(--gold); }
.audio-upload-area.uploaded { border-color: var(--success); background: #F0FFF0; }

/* ── Obituary editor ────────────────────────────────────────── */
.obit-editor {
  position: relative;
}

.ai-draft-banner {
  background: linear-gradient(135deg, var(--tan-lt), #FFF8EC);
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.ai-draft-banner .ai-icon { font-size: 1.4rem; flex-shrink: 0; }
.ai-draft-banner p { font-size: 0.875rem; color: var(--brown); line-height: 1.5; }

.obit-textarea {
  width: 100%;
  min-height: 280px;
  padding: 16px;
  border: 1.5px solid var(--tan);
  border-radius: var(--radius);
  font-size: 0.95rem;
  line-height: 1.75;
  font-family: var(--font-serif);
  color: var(--black);
  resize: vertical;
  outline: none;
  transition: var(--trans);
}
.obit-textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(184,150,46,0.15); }

.obit-actions {
  display: flex;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
}

/* ── Template picker ────────────────────────────────────────── */
.template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 16px;
  margin-top: 12px;
}

.template-card {
  border: 2px solid var(--tan);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: var(--trans);
}

.template-card:hover { border-color: var(--gold); }
.template-card.selected { border-color: var(--brown); box-shadow: 0 0 0 3px rgba(59,31,10,0.15); }

.template-card img { width: 100%; aspect-ratio: 3/4; object-fit: cover; display: block; }
.template-card span { display: block; padding: 6px 8px; font-size: 0.75rem; color: var(--gray); text-align: center; }

/* ── Collaborator section ───────────────────────────────────── */
.collab-add {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  margin-bottom: 16px;
}
.collab-add .form-group { flex: 1; margin-bottom: 0; }
.collab-add input { margin-bottom: 0; }

.collab-list { display: flex; flex-direction: column; gap: 8px; }
.collab-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: var(--tan-lt);
  border-radius: var(--radius);
  font-size: 0.875rem;
}
.collab-item .sections { color: var(--gray); font-size: 0.8rem; }

/* ── Family admin list ──────────────────────────────────────── */
.family-admin-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}
.family-admin-row input { flex: 1; }

/* ── Coupon row ─────────────────────────────────────────────── */
.coupon-row {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  margin-top: 8px;
}
.coupon-row input { flex: 1; }
.coupon-status { font-size: 0.85rem; padding: 4px 8px; }

/* ── Distribution list ──────────────────────────────────────── */
.dist-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.dist-tag {
  background: var(--tan-lt);
  border: 1px solid var(--tan);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 6px;
}
.dist-tag button { background: none; border: none; cursor: pointer; color: var(--gray); font-size: 0.7rem; }

/* ── Review step ────────────────────────────────────────────── */
.review-section {
  border: 1px solid var(--tan);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}
.review-section h4 { font-family: var(--font-serif); color: var(--brown); margin-bottom: 12px; font-size: 1rem; }
.review-row { display: flex; justify-content: space-between; font-size: 0.875rem; margin-bottom: 6px; }
.review-row .label { color: var(--gray); }
.review-row .value { font-weight: 500; }

.price-summary {
  background: var(--tan-lt);
  border-radius: var(--radius);
  padding: 20px;
  margin-top: 16px;
}
.price-line { display: flex; justify-content: space-between; font-size: 0.9rem; margin-bottom: 8px; }
.price-total { display: flex; justify-content: space-between; font-weight: 700; font-size: 1.1rem; border-top: 1px solid var(--tan); padding-top: 12px; margin-top: 4px; color: var(--brown); }

/* ── Wizard nav ─────────────────────────────────────────────── */
.wizard-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--tan-lt);
}

/* ── Payment form ───────────────────────────────────────────── */
.payment-container {
  max-width: 480px;
  margin: 0 auto;
}

#payment-element {
  border: 1.5px solid var(--tan);
  border-radius: var(--radius);
  padding: 12px;
  margin-bottom: 20px;
  background: var(--white);
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 600px) {
  .wizard-container { padding: 16px 16px 40px; }
  .wizard-body { padding: 24px 20px; }
  .form-row { grid-template-columns: 1fr; }
  .form-row.three-col { grid-template-columns: 1fr; }
  .wizard-nav { flex-direction: column-reverse; gap: 12px; }
  .wizard-nav button { width: 100%; }
}
