/* =========================================
   🎄 THEME: CHRISTMAS MAGIC UX
   ========================================= */

:root {
  --christmas-red: #d42426;
  --christmas-dark-red: #a01214;
  --christmas-green: #2e7d32;
  --christmas-gold: #fbc02d;
  --snow-white: #ffffff;
  --bg-color: #f8fcfd;
  --text-main: #4a2c2c;
  --text-muted: #8c6b6b;
  --input-bg: #fff;
  --input-border: #e8dada;
  --radius-lg: 20px;
  --radius-md: 12px;
  --shadow-soft: 0 10px 40px -10px rgba(212, 36, 38, 0.15);
  --font-heading: 'Playfair Display', serif;
  --font-body: 'Inter', sans-serif;
}

/* === Reset & Base === */
* { box-sizing: border-box; outline: none; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background-color: var(--bg-color);
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(212, 36, 38, 0.03) 0%, transparent 20%),
    radial-gradient(circle at 90% 80%, rgba(46, 125, 50, 0.03) 0%, transparent 20%);
  color: var(--text-main);
  margin: 0;
  line-height: 1.6;
  min-height: 100vh;
}

/* === Background Snow Animation (Sutil) === */
body::before {
  content: "";
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='2' cy='2' r='1' fill='%23d42426' opacity='0.05'/%3E%3C/svg%3E");
  z-index: -1;
  mask-image: linear-gradient(to bottom, transparent, black);
}

/* === Layout Principal === */
.wrap.wizard {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px;
  display: grid;
  grid-template-columns: 1fr 400px; /* Form esquerda, Preview direita */
  gap: 40px;
  align-items: start;
}

/* === Stepper (Passos) === */
.stepper {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  list-style: none;
  padding: 0;
  margin: 20px 0 30px;
  position: relative;
  z-index: 2;
}

.stepper .step {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  flex: 1;
  opacity: 0.5;
  transition: all 0.3s ease;
}

.stepper .step.active { opacity: 1; }
.stepper .step.active span {
  background: var(--christmas-red);
  color: #fff;
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(212, 36, 38, 0.3);
  border-color: var(--christmas-red);
}

.stepper .step span {
  width: 36px; height: 36px;
  background: #fff;
  border: 2px solid #e0e0e0;
  color: #999;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 8px;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.stepper .step small {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Linha conectora */
.stepper::before {
  content: ""; position: absolute; top: 18px; left: 30px; right: 30px;
  height: 2px; background: #e0e0e0; z-index: -1;
}

/* === Candy Cane Progress Bar === */
.progress {
  grid-column: 1 / -1;
  height: 8px;
  background: #eee;
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 40px;
}

.progress-bar {
  height: 100%;
  background: repeating-linear-gradient(
    45deg,
    var(--christmas-red),
    var(--christmas-red) 10px,
    #ff6b6b 10px,
    #ff6b6b 20px
  );
  width: 0%;
  transition: width 0.5s ease;
  box-shadow: 0 0 10px rgba(212, 36, 38, 0.4);
}

/* === Seção do Formulário === */
.form {
  background: #fff;
  padding: 40px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  position: relative;
  overflow: hidden;
}

.form::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 6px;
  background: linear-gradient(90deg, var(--christmas-green), var(--christmas-red), var(--christmas-gold));
}

.form h1 {
  font-family: var(--font-heading);
  font-size: 28px;
  color: var(--christmas-red);
  margin-bottom: 30px;
  text-align: center;
}

/* Fieldsets e Transições */
fieldset { border: 0; padding: 0; margin: 0; display: none; animation: fadeIn 0.4s ease; }
fieldset.active { display: block; }
legend { display: none; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* Inputs e Labels */
label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-main);
  font-size: 14px;
}
label small { color: var(--text-muted); font-weight: 400; }

input[type="text"], input[type="email"], input[type="date"], select, textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--input-border);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--text-main);
  transition: all 0.2s;
  background: #fdfdfd;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--christmas-red);
  box-shadow: 0 0 0 4px rgba(212, 36, 38, 0.1);
  background: #fff;
}

textarea { height: 120px; resize: vertical; }

.form-msg { color: var(--christmas-red); font-size: 13px; margin-top: 6px; min-height: 20px; }
.charcount { text-align: right; font-size: 12px; color: #999; margin-top: -20px; margin-bottom: 20px; position: relative; z-index: 2; pointer-events: none; padding-right: 10px;}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }

/* === Botões === */
.nav { display: flex; justify-content: space-between; margin-top: 30px; align-items: center; }

.btn {
  padding: 14px 32px;
  border-radius: 99px;
  border: none;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.2s;
  font-family: var(--font-body);
}

.btn:active { transform: scale(0.98); }

.btn.next, .btn.submit {
  background: var(--christmas-red);
  color: #fff;
  box-shadow: 0 4px 15px rgba(212, 36, 38, 0.3);
  margin-left: auto;
}

.btn.next:hover, .btn.submit:hover {
  background: var(--christmas-dark-red);
  box-shadow: 0 6px 20px rgba(212, 36, 38, 0.4);
}

.btn.ghost {
  background: transparent;
  color: var(--text-muted);
}
.btn.ghost:hover { color: var(--text-main); background: #f0f0f0; }

.btn.tiny { padding: 6px 12px; font-size: 12px; border: 1px solid #e0e0e0; }

/* === Sugestões Box === */
.row-sugestoes { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.sugestoes { margin-bottom: 15px; padding: 15px; background: #fff8f8; border-radius: 12px; border: 1px dashed #fab1b2; }
.sugestoes .grid { display: grid; gap: 10px; }
.sugestoes button {
  background: #fff; border: 1px solid #f2dada; padding: 10px; border-radius: 8px;
  text-align: left; font-size: 13px; color: #6e4c4c; cursor: pointer; transition: all 0.2s;
}
.sugestoes button:hover { border-color: var(--christmas-red); color: var(--christmas-red); }

/* === Upload de Fotos (Slots) === */
.fotos {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px;
}
.foto-slot {
  aspect-ratio: 9/16;
  background: #f9f9f9;
  border: 2px dashed #e0e0e0;
  border-radius: 12px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.2s;
  cursor: pointer;
}
.foto-slot:hover { border-color: var(--christmas-red); background: #fffbfb; }

.foto-slot input {
  position: absolute; inset: 0; opacity: 0; cursor: pointer; z-index: 2;
}
.foto-slot label {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  text-align: center; color: #aaa; pointer-events: none; z-index: 1; font-size: 12px; padding: 5px;
}
.foto-slot img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 3; display: none;
}

/* === Preview Section (Celular) === */
.preview {
  position: sticky; top: 20px;
}

.frame {
  background: #111;
  border-radius: 40px;
  padding: 12px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.2);
  border: 4px solid #333;
  position: relative;
}
.frame::before {
  content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 120px; height: 25px; background: #111; border-bottom-left-radius: 16px; border-bottom-right-radius: 16px; z-index: 10;
}

.frame-inner {
  background: #fff;
  border-radius: 32px;
  overflow: hidden;
  height: 750px;
  overflow-y: auto;
  position: relative;
  text-align: center;
  font-size: 14px;
  scrollbar-width: none;
}
.frame-inner::-webkit-scrollbar { display: none; }
.frame-inner .url {
  background: #f0f0f0; color: #888; font-size: 10px; padding: 30px 0 10px;
  margin-bottom: 10px; letter-spacing: 0.5px;
}

.frame-inner h2 {
  font-family: var(--font-heading);
  color: var(--christmas-red);
  font-size: 22px; margin: 10px 20px;
  line-height: 1.2;
}

.slideshow {
  width: 90%; aspect-ratio: 9/16; margin: 10px auto;
  background: #eee; border-radius: 16px; position: relative; overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.slideshow img { width: 100%; height: 100%; object-fit: cover; animation: fadeInSlide 0.5s ease; }
.slideshow .placeholder {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: #bbb; padding: 20px;
}
@keyframes fadeInSlide { from { opacity: 0; transform: scale(1.05); } to { opacity: 1; transform: scale(1); } }

.tempo-title { font-weight: 700; color: var(--christmas-green); margin-top: 20px; text-transform: uppercase; font-size: 12px; letter-spacing: 1px; }

.tempo-vivo {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 0 15px; margin-bottom: 20px;
}
.tempo-vivo div {
  background: #fff; border: 1px solid #f0f0f0; border-radius: 8px; padding: 8px 4px;
  display: flex; flex-direction: column; font-size: 10px; color: #888;
  box-shadow: 0 2px 5px rgba(0,0,0,0.03);
}
.tempo-vivo strong { font-size: 16px; color: var(--christmas-red); margin-bottom: 2px; }

.mensagem {
  font-family: 'Georgia', serif; font-style: italic; color: #555;
  padding: 0 25px 40px; line-height: 1.6; font-size: 15px;
}

/* === Review Mode === */
body.review-mode .form { grid-column: 1 / -1; max-width: 600px; margin: 0 auto; text-align: center; }
body.review-mode .wrap.wizard { display: block; }
body.review-mode .preview { display: none; }

.resume {
  list-style: none; padding: 15px; background: #f9f9f9; border-radius: 12px;
  margin: 0 auto 20px; display: inline-block; text-align: left; min-width: 300px;
}
.resume li { margin-bottom: 6px; font-size: 14px; color: #555; }
.resume strong { color: var(--christmas-red); }

.review-area { margin: 20px auto; max-width: 360px; }
.review-block { background: #eefbf1; border: 1px solid #c8e6d0; padding: 20px; border-radius: 12px; margin: 20px 0; text-align: left;}
.review-block input { background: #fff; }

/* === NOVOS CARD DE PLANO (Dopamine Booster) === */
.plans-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 20px 0 10px;
}

.plan-card {
    position: relative;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 16px;
    padding: 24px 20px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* Esconde o radio button nativo */
.plan-card input[type="radio"] {
    position: absolute; opacity: 0; width: 0; height: 0;
}

/* Efeito de Hover */
.plan-card:hover {
    border-color: #fca5a5;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(212, 36, 38, 0.08);
}

/* Estado Selecionado */
.plan-card:has(input:checked) {
    border-color: var(--christmas-red);
    background-color: #fff5f5;
    box-shadow: 0 0 0 2px rgba(212, 36, 38, 0.2);
}

.plan-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 8px;
}

.plan-price {
    font-size: 28px;
    font-weight: 800;
    color: var(--christmas-red);
    margin-bottom: 6px;
}
.plan-price small {
    font-size: 14px; font-weight: 400; color: #999;
}

.plan-desc {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Destaque para o plano Eterno */
.plan-card.featured {
    border-color: #fbc02d;
    background: linear-gradient(to bottom, #fffcf5, #fff);
}
.plan-card.featured:has(input:checked) {
    border-color: #fbc02d;
    background-color: #fffdf5;
    box-shadow: 0 0 0 4px rgba(251, 192, 45, 0.2);
}

.badge-rec {
    position: absolute;
    top: -12px;
    background: #fbc02d;
    color: #8a6d00;
    font-weight: 800;
    font-size: 11px;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 20px;
    box-shadow: 0 4px 10px rgba(251, 192, 45, 0.3);
    letter-spacing: 0.5px;
}

.check-icon {
    width: 24px; height: 24px;
    border-radius: 50%;
    border: 2px solid #ddd;
    margin-top: 15px;
    position: relative;
    transition: all 0.2s;
}
.plan-card:has(input:checked) .check-icon {
    background: var(--christmas-red);
    border-color: var(--christmas-red);
}
.plan-card.featured:has(input:checked) .check-icon {
    background: #fbc02d;
    border-color: #fbc02d;
}

/* Ícone de check dentro da bolinha */
.check-icon::after {
    content: "";
    position: absolute; top: 6px; left: 8px;
    width: 5px; height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    display: none;
}
.plan-card:has(input:checked) .check-icon::after { display: block; }


/* === Responsive === */
@media (max-width: 900px) {
  .wrap.wizard { grid-template-columns: 1fr; gap: 40px; }
  .preview { display: none; }
  .grid-2 { grid-template-columns: 1fr; }
  .fotos { grid-template-columns: repeat(2, 1fr); }
  .stepper span { width: 30px; height: 30px; font-size: 12px; }
  .stepper small { display: none; }
  .plans-grid { grid-template-columns: 1fr; } /* Mobile: um em cima do outro */
}