/* /create wizard styles. Loaded only on the wizard pages via _Layout's body class */

.wizard-shell {
  max-width: 1100px;
  margin: 0 auto;
  padding: clamp(40px, 6vw, 72px) clamp(20px, 5vw, 48px) 120px;
  position: relative;
}
/* Functional elements above decorations */
.wizard-header,
.wizard-form,
#upload-shell,
#preview-shell,
.wizard-footer { position: relative; z-index: 1; }

.wizard-header { text-align: center; margin-bottom: 36px; }
.wizard-header h1 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  color: #111;
  margin-bottom: 10px;
  line-height: 1.1;
}
.wizard-step-label { color: var(--c-blue); font-weight: 800; font-size: .85rem; text-transform: uppercase; letter-spacing: .12em; }
.wizard-helper { color: var(--text-muted); font-size: .95rem; margin-top: 12px; max-width: 560px; margin-left: auto; margin-right: auto; line-height: 1.6; }

/* Hand-drawn corner decorations scattered around the wizard.
   Markup is optional — only Create.cshtml currently uses these. */
.wizard-deco {
  position: absolute;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}
.wizard-deco-heart-tl  { top: 36px;    left:  4%;  width: 50px; transform: rotate(-12deg); }
.wizard-deco-star-tr   { top: 40px;    right: 5%;  width: 50px; transform: rotate(14deg);  }
.wizard-deco-star-tl-p { top: 130px;   left: 11%;  width: 32px; transform: rotate(20deg);  }
.wizard-deco-heart-tr  { top: 130px;   right: 12%; width: 36px; transform: rotate(8deg);   }
.wizard-deco-sq-bl     { bottom: 220px; left: 4%;  width: 90px; transform: rotate(-6deg); opacity: .85; }
.wizard-deco-arrow-br  { bottom: 230px; right: 5%; width: 78px; transform: rotate(8deg); opacity: .9; }
@media (max-width: 1000px) {
  .wizard-deco-star-tl-p, .wizard-deco-heart-tr,
  .wizard-deco-sq-bl, .wizard-deco-arrow-br { display: none; }
}
@media (max-width: 700px) {
  .wizard-deco { display: none; }
}

/* Drop zone — playful dashed border, sits on the cream wizard background */
.dropzone {
  border: 3px dashed #c5d4e0;
  border-radius: 18px;
  background: #fff;
  padding: 44px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, background .2s, box-shadow .2s;
  margin-bottom: 24px;
  box-shadow: 0 4px 14px rgba(15, 30, 60, 0.04);
}
.dropzone:hover, .dropzone--over {
  border-color: var(--c-blue);
  background: #f0f7ff;
  box-shadow: 0 8px 22px rgba(0, 114, 188, 0.08);
}
.dropzone-icon { font-size: 2.2rem; margin-bottom: 10px; }
.dropzone-text { font-weight: 800; font-size: 1.1rem; color: #111; margin-bottom: 6px; }
.dropzone-sub { font-size: .9rem; color: var(--text-soft); }

/* Tile grid */
.tile-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  padding: 0;
  margin: 0;
}

.tile {
  background: #fff;
  border: 2px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  transition: border-color .15s ease, transform .15s ease;
}
.tile-thumb { cursor: grab; }
.tile-thumb:active { cursor: grabbing; }
.tile--ghost { opacity: 0.5; }
.tile--ok    { border-color: var(--c-green); }
.tile--warn  { border-color: var(--c-orange); }
.tile--error,
.tile--failed-upload { border-color: var(--c-red); }

.tile-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.tile-thumb {
  aspect-ratio: 1;
  background: #f4f6f9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: #ccc;
  overflow: hidden;
  position: relative;
}
.tile-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tile-page {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(0,0,0,0.7);
  color: #fff;
  padding: 3px 8px;
  border-radius: 50px;
  font-size: .72rem;
  font-weight: 700;
  z-index: 2;
}

.tile-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(0,0,0,0.6);
  color: #fff;
  border: none;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.tile-remove:hover { background: var(--c-red); }

/* Cover-pick chip — anchored to the bottom-left of the thumb, mirroring
   the page badge in the top-left. Toggles on click; sits above the
   reorder/upload overlay so it stays tappable in any tile state. */
.tile-cover {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  border: none;
  border-radius: 50px;
  padding: 4px 10px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .02em;
  cursor: pointer;
  z-index: 3;
  line-height: 1.1;
}
.tile-cover:hover { background: rgba(0,0,0,0.8); }
.tile-cover--on,
.tile-cover--on:hover { background: var(--c-yellow); color: #111; }

.tile-overlay {
  padding: 8px 10px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
}
.tile-overlay-inner { display: flex; align-items: center; gap: 8px; width: 100%; }

/* Reorder bar — shown for tiles that have finished uploading. Big tap targets,
   centred hint label between them. Up disabled at index 0, down at the end. */
.tile-overlay-reorder {
  justify-content: space-between;
  gap: 6px;
}
.tile-reorder-hint {
  font-size: .72rem;
  font-weight: 700;
  color: var(--text-soft);
  letter-spacing: .02em;
  text-transform: uppercase;
}
.tile-move {
  appearance: none;
  border: none;
  background: #f0f4f8;
  color: #111;
  width: 44px;
  height: 36px;
  border-radius: 10px;
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color .12s ease, transform .08s ease, color .12s ease;
  flex-shrink: 0;
  /* prevent iOS double-tap zoom on rapid taps */
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.tile-move:hover:not(:disabled) {
  background: var(--c-blue);
  color: #fff;
}
.tile-move:active:not(:disabled) {
  transform: scale(.92);
}
.tile-move:disabled {
  opacity: .28;
  cursor: not-allowed;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .78rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 50px;
}
.badge--neutral { background: #f0f4f8; color: var(--text-muted); }
.badge--ok      { background: #dcf5dc; color: var(--c-green); }
.badge--err     { background: #fde2e0; color: var(--c-red); }

.progress { flex: 1; height: 6px; background: #e8eef5; border-radius: 50px; overflow: hidden; }
.progress-bar { height: 100%; background: var(--grad-blue-purple); transition: width .15s ease; }

/* Overlaid on the bottom of the square thumb so it never changes tile height —
   keeps the grid rows uniform. Clamped + faded; full text via title tooltip. */
.tile-msg {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 16px 10px 8px;
  font-size: .72rem;
  line-height: 1.35;
  color: #fff;
  background: linear-gradient(to top,
    rgba(0,0,0,.85) 0%, rgba(0,0,0,.6) 65%, rgba(0,0,0,0) 100%);
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  z-index: 2;
}

.tile-retry {
  background: var(--c-blue);
  color: #fff;
  border: none;
  padding: 4px 12px;
  border-radius: 50px;
  font-size: .76rem;
  font-weight: 700;
  cursor: pointer;
}

/* Wizard footer (sticky on mobile) */
.wizard-footer {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.price-tag {
  font-size: 1.1rem;
  padding: 10px 22px;
  border-radius: 50px;
  border-left: 4px solid #e8e8e8;
  background: #fff;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.price-tag--inactive { color: var(--text-soft); border-left-color: #e0e0e0; }
.price-tag--active { color: #111; border-left-color: var(--c-green); background: #f7fdf6; }
.price-tag--cap .cap-pill {
  background: var(--c-orange);
  color: #fff;
  font-size: .68rem;
  padding: 2px 8px;
  border-radius: 50px;
  font-weight: 800;
}

.continue-helper {
  font-size: .9rem;
  color: var(--text-muted);
  min-height: 1.4em;
  text-align: center;
}
.continue-helper--flash { color: var(--c-orange); font-weight: 700; }

.continue-btn {
  margin-top: 4px;
}
.continue-btn:disabled {
  background: color-mix(in srgb, var(--c-blue) 10%, #fff 90%) !important;
  border-color: color-mix(in srgb, var(--c-blue) 22%, #fff 78%) !important;
  color: color-mix(in srgb, var(--c-blue) 55%, #fff 45%) !important;
  box-shadow: none !important;
  cursor: not-allowed;
}
.continue-btn:disabled::after { opacity: .55; }

.session-note {
  margin-top: 36px;
  text-align: center;
  font-size: .8rem;
  color: var(--text-soft);
}

/* Mobile sticky footer */
@media (max-width: 700px) {
  .wizard-shell { padding-bottom: 200px; }
  .wizard-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 14px 16px;
    background: #fff;
    border-top: 1px solid var(--border);
    box-shadow: 0 -4px 16px rgba(0,0,0,.06);
    z-index: 50;
    margin-top: 0;
  }
  .continue-btn { width: 100%; }
}

body.wizard { background: #fdf7ea; }   /* warm cream — matches brand pages */

/* ── Wizard form (Steps 2 + 4) ────────────────────────────────────────── */
.wizard-form {
  background: #fff;
  border-radius: 18px;
  padding: 32px 28px;
  box-shadow: 0 4px 18px rgba(15,30,60,.06);
  max-width: 560px;
  margin: 0 auto;
}
@media (max-width: 600px) { .wizard-form { padding: 24px 20px; } }

.wizard-form-section {
  font-size: 1rem;
  font-weight: 900;
  color: #111;
  margin: 16px 0 18px;
  padding-bottom: 8px;
  border-bottom: 2px solid #f0f0f0;
}
.wizard-form-section:first-child { margin-top: 0; }

.wizard-form label {
  display: block;
  font-size: .88rem;
  font-weight: 800;
  color: #111;
  margin-bottom: 6px;
}
.wizard-form .req { color: var(--c-red); }
.wizard-form .optional { color: var(--text-soft); font-weight: 600; font-size: .82rem; }

.wizard-form input[type="text"],
.wizard-form input[type="email"] {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid #d8dde5;
  border-radius: 10px;
  font-size: 1rem;
  font-family: inherit;
  outline: none;
  margin-bottom: 8px;
  transition: border-color .15s ease, box-shadow .15s ease;
  background: #fff;
}
.wizard-form input:focus {
  border-color: var(--c-blue);
  box-shadow: 0 0 0 3px rgba(0,114,188,0.12);
}
.wizard-form input.invalid {
  border-color: var(--c-red);
  box-shadow: 0 0 0 3px rgba(220,38,38,0.10);
}
.field-error {
  color: var(--c-red);
  font-size: .82rem;
  font-weight: 600;
  margin: -2px 0 12px 0;
  min-height: 1em;  /* reserve space so the layout doesn't jump when an error appears */
}

.form-hint { font-size: .82rem; color: var(--text-soft); margin: 0 0 18px 0; }

/* Top-of-form error banner — constrained to form width so it lines up with the card below */
.checkout-error-banner {
  max-width: 560px;
  margin: 0 auto 16px;
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: .92rem;
}

.wizard-form-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px;
  align-items: center;
  justify-content: space-between;
}

/* Checkout summary */
.checkout-summary {
  background: var(--bg-warm);
  border-radius: 12px;
  padding: 18px 22px;
  margin: 24px 0;
}
.checkout-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  font-size: .96rem;
  color: var(--text-muted);
}
.checkout-summary-row--free strong { color: var(--c-green); }
.checkout-summary-row--total {
  font-size: 1.1rem;
  font-weight: 800;
  color: #111;
  padding-top: 12px;
  border-top: 1px solid rgba(0,0,0,.08);
}

.btn-pay { font-size: 1.05rem; padding: 16px 32px; }

.bypass-explainer {
  margin-top: 20px;
  padding: 14px 18px;
  background: #fff8e1;
  border-left: 4px solid var(--c-orange);
  border-radius: 0 10px 10px 0;
  font-size: .88rem;
  color: #7a4500;
}

/* Site-wide bypass banner */
.bypass-banner {
  background: #ffd700;
  color: #5a4500;
  text-align: center;
  font-size: .88rem;
  font-weight: 800;
  padding: 8px 16px;
  border-bottom: 2px solid #e0a000;
}

/* Success card */
.success-card {
  background: #fff;
  border-radius: 18px;
  padding: 28px 24px;
  box-shadow: 0 4px 18px rgba(15,30,60,.06);
  max-width: 520px;
  margin: 0 auto;
}
.success-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 8px 0;
  font-size: .95rem;
}
.success-row span { color: var(--text-muted); }
.success-row strong { color: #111; }
.success-card hr { border: none; border-top: 1px solid #eee; margin: 12px 0; }
