/* ============================================================
   invitaqr / assets / css / crear.css
   ============================================================ */

:root {
  --iq-primary:   #7B2FBE;
  --iq-accent:    #FF6B9D;
  --iq-yellow:    #FFD166;
  --iq-dark:      #1a1a2e;
  --iq-light:     #f8f2ff;
  --iq-radius:    20px;
  --iq-shadow:    0 6px 30px rgba(123,47,190,.12);
}

body {
  font-family: 'Nunito', sans-serif;
  background: linear-gradient(160deg, #f8f2ff 0%, #fce4ec 100%);
  min-height: 100vh;
  color: var(--iq-dark);
}

/* ── NAVBAR WIZARD ─────────────────────────────────────────── */
.iq-crear-nav {
  background: linear-gradient(135deg, var(--iq-primary), var(--iq-accent));
  padding: .6rem 0;
  box-shadow: 0 3px 20px rgba(0,0,0,.2);
}
.iq-brand-sm {
  font-family: 'Pacifico', cursive;
  color: #fff; text-decoration: none;
  font-size: 1.25rem;
}

/* Step indicator */
.iq-step-indicator {
  display: flex; align-items: center; gap: .5rem;
  flex: 1; justify-content: center;
}
.iq-si-item {
  display: flex; align-items: center; gap: .5rem;
  opacity: .5; transition: opacity .3s;
}
.iq-si-item.active { opacity: 1; }
.iq-si-circle {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: rgba(255,255,255,.25);
  border: 2px solid rgba(255,255,255,.6);
  color: #fff; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  font-size: .85rem;
  transition: background .3s;
}
.iq-si-item.active .iq-si-circle {
  background: #fff;
  color: var(--iq-primary);
  border-color: #fff;
}
.iq-si-item span { color: rgba(255,255,255,.9); font-size: .82rem; font-weight: 700; }
.iq-si-line {
  width: 50px; height: 2px;
  background: rgba(255,255,255,.3);
  border-radius: 2px;
}

/* ── WIZARD CARD ───────────────────────────────────────────── */
.iq-step-wrapper { padding-bottom: 3rem; }
.iq-wizard-card {
  background: #fff;
  border-radius: 28px;
  box-shadow: var(--iq-shadow);
  overflow: clip; /* clip recorta sin crear scroll container → sticky funciona */
}
.iq-wizard-header {
  background: linear-gradient(135deg, var(--iq-primary), var(--iq-accent));
  color: #fff;
  padding: 2rem 2.5rem;
}
.iq-wizard-header h2 { font-size: 1.6rem; font-weight: 900; margin: 0; }
.iq-wizard-header p  { margin: .4rem 0 0; opacity: .9; }

/* ── EMAIL NOTE (paso 0) ────────────────────────────────────── */
.iq-email-note {
  background: rgba(255,255,255,.18);
  border: 1.5px solid rgba(255,255,255,.35);
  border-radius: 10px;
  padding: .7rem 1rem;
  font-size: .9rem;
  color: #fff;
  opacity: .95;
}

/* ── EMAIL BADGE (paso 1 y 2) ───────────────────────────────── */
.iq-email-badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: rgba(255,255,255,.2);
  border: 1.5px solid rgba(255,255,255,.4);
  border-radius: 20px;
  padding: .3rem .9rem;
  font-size: .82rem;
  font-weight: 700;
  color: #fff;
}
.iq-email-badge-tip { font-weight: 400; opacity: .8; }

/* ── SECTION BLOCKS ────────────────────────────────────────── */
.iq-section-block {
  padding: 2rem 2.5rem;
  border-bottom: 1px solid #f0e8ff;
}
.iq-section-block:last-child { border-bottom: none; }
.iq-section-label {
  font-size: 1.05rem; font-weight: 800;
  color: var(--iq-primary);
  margin-bottom: 1.2rem;
}

/* ── INPUTS ─────────────────────────────────────────────────── */
.iq-input {
  border: 2px solid #e8d8ff;
  border-radius: 12px;
  font-family: 'Nunito', sans-serif;
  font-size: .95rem;
  padding: .6rem .95rem;
  transition: border-color .2s, box-shadow .2s;
}
.iq-input:focus {
  border-color: var(--iq-primary);
  box-shadow: 0 0 0 3px rgba(123,47,190,.12);
  outline: none;
}

/* ── TEXT GRID ─────────────────────────────────────────────── */
.iq-text-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: .75rem;
}
.iq-text-chip {
  background: var(--iq-light);
  border: 2px solid #e8d8ff;
  border-radius: 14px;
  padding: .9rem 1.1rem;
  font-size: .88rem;
  cursor: pointer;
  transition: all .2s;
  position: relative;
  line-height: 1.5;
}
.iq-text-chip:hover {
  border-color: var(--iq-primary);
  background: #f0e8ff;
}
.iq-text-chip.selected {
  border-color: var(--iq-primary);
  background: linear-gradient(135deg, rgba(123,47,190,.08), rgba(255,107,157,.08));
  box-shadow: 0 3px 12px rgba(123,47,190,.15);
}
.iq-text-chip.selected::after {
  content: '✓';
  position: absolute; top: .4rem; right: .6rem;
  color: var(--iq-primary); font-weight: 900; font-size: 1rem;
}

/* ── OPTIONAL SECTIONS ─────────────────────────────────────── */
.iq-opt-card {
  border: 2px solid #f0e8ff;
  border-radius: var(--iq-radius);
  margin-bottom: .9rem;
  overflow: hidden;
  transition: border-color .2s, box-shadow .2s;
}
.iq-opt-card.active {
  border-color: var(--iq-primary);
  box-shadow: 0 4px 18px rgba(123,47,190,.1);
}
.iq-opt-header {
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.4rem;
  cursor: pointer;
  user-select: none;
  transition: background .2s;
  gap: 1rem;
}
.iq-opt-header:hover { background: #faf5ff; }
.iq-opt-icon {
  font-size: 1.5rem;
  width: 46px; height: 46px;
  background: #FFF0E6;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.iq-opt-body {
  padding: 0 1.4rem;
  max-height: 0;
  overflow: hidden;
  transition: max-height .35s ease, padding .3s;
}
.iq-opt-body.open {
  max-height: 600px;
  padding: 0 1.4rem 1.4rem;
}

/* Toggle switch */
.iq-toggle {
  width: 46px; height: 26px;
  background: #ddd;
  border-radius: 50px;
  position: relative;
  flex-shrink: 0;
  transition: background .2s;
  cursor: pointer;
}
.iq-toggle::after {
  content: '';
  position: absolute;
  width: 20px; height: 20px;
  background: #fff;
  border-radius: 50%;
  top: 3px; left: 3px;
  transition: left .2s;
  box-shadow: 0 2px 5px rgba(0,0,0,.2);
}
.iq-toggle.on { background: var(--iq-primary); }
.iq-toggle.on::after { left: 23px; }

.iq-opt-tag {
  background: linear-gradient(135deg, var(--iq-primary), var(--iq-accent));
  color: #fff;
  border-radius: 30px;
  padding: .2rem .7rem;
  font-size: .72rem;
  font-weight: 700;
  white-space: nowrap;
}

/* ── MAP PREVIEW ───────────────────────────────────────────── */
.iq-map-preview iframe { width: 100%; }
.iq-btn-secondary {
  background: var(--iq-light);
  border: 2px solid #e8d8ff;
  color: var(--iq-primary);
  font-weight: 700;
  border-radius: 10px;
  transition: all .2s;
}
.iq-btn-secondary:hover { background: #f0e8ff; border-color: var(--iq-primary); }

/* ── LAYOUT SELECTOR ───────────────────────────────────────── */
.iq-layout-selector { display: flex; gap: 1rem; }
.iq-layout-opt {
  border: 2px solid #e8d8ff;
  border-radius: 14px;
  padding: .8rem 1.2rem;
  cursor: pointer;
  text-align: center;
  transition: all .2s;
  user-select: none;
}
.iq-layout-opt input { display: none; }
.iq-layout-opt.active {
  border-color: var(--iq-primary);
  background: #f0e8ff;
  color: var(--iq-primary);
  font-weight: 700;
}
.iq-layout-opt span { display: block; font-size: .82rem; font-weight: 700; margin-top: .4rem; }
.iq-layout-preview {
  width: 80px; height: 50px;
  overflow: hidden; border-radius: 8px;
  background: #f5f5f5;
  display: flex; align-items: center; justify-content: center;
}
/* Carousel preview */
.iq-lp-carousel { display:flex; gap:4px; align-items:flex-end; }
.iq-lp-carousel div {
  width: 22px; height: 32px; border-radius: 4px; background: #ddd;
}
.iq-lp-carousel div.active {
  background: var(--iq-primary); height: 42px;
}
/* Masonry preview */
.iq-lp-masonry { display:grid; grid-template-columns:1fr 1fr; gap:3px; }
.iq-lp-masonry div {
  background: #ddd; border-radius: 3px; height: 18px;
}
.iq-lp-masonry div.tall { height: 30px; }

/* ── UPLOAD ZONE ───────────────────────────────────────────── */
.iq-upload-zone {
  border: 2.5px dashed #c9b0ef;
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: all .2s;
  background: #faf5ff;
}
.iq-upload-zone:hover {
  border-color: var(--iq-primary);
  background: #f0e8ff;
}
.iq-upload-zone-sm {
  border: 2.5px dashed #c9b0ef;
  border-radius: 14px;
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all .2s;
  background: #faf5ff;
}
.iq-upload-zone-sm:hover { border-color: var(--iq-primary); background: #f0e8ff; }

/* ── FOTO GRID (thumbnails) ────────────────────────────────── */
.iq-foto-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: .5rem;
}
.iq-foto-thumb {
  position: relative;
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
}
.iq-foto-thumb img {
  width: 100%; height: 100%; object-fit: cover;
  display: block;
}
.iq-foto-thumb .iq-foto-del {
  position: absolute; top: 3px; right: 3px;
  background: rgba(220,53,69,.9);
  color: #fff; border: none;
  width: 22px; height: 22px;
  border-radius: 50%;
  font-size: .7rem;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity .2s;
}
.iq-foto-thumb:hover .iq-foto-del { opacity: 1; }

/* ── MUSIC TABS ────────────────────────────────────────────── */
.iq-music-tabs {
  display: flex; gap: .5rem;
  background: var(--iq-light);
  border-radius: 14px;
  padding: .35rem;
}
.iq-mtab {
  flex: 1;
  background: transparent;
  border: none;
  border-radius: 10px;
  padding: .5rem;
  font-family: 'Nunito', sans-serif;
  font-size: .85rem;
  font-weight: 700;
  color: #777;
  cursor: pointer;
  transition: all .2s;
}
.iq-mtab.active {
  background: #fff;
  color: var(--iq-primary);
  box-shadow: 0 2px 10px rgba(123,47,190,.12);
}

/* Music catalog */
.iq-music-list {
  display: flex; flex-direction: column; gap: .5rem;
  max-height: 240px;
  overflow-y: auto;
  padding-right: .3rem;
}
.iq-music-item {
  display: flex; align-items: center; gap: .8rem;
  padding: .7rem 1rem;
  border: 2px solid #f0e8ff;
  border-radius: 12px;
  cursor: pointer;
  transition: all .2s;
  user-select: none;
}
.iq-music-item:hover { border-color: var(--iq-primary); background: #faf5ff; }
.iq-music-item.selected {
  border-color: var(--iq-primary);
  background: #f0e8ff;
}
.iq-music-item .iq-mi-icon {
  width: 34px; height: 34px;
  background: linear-gradient(135deg, var(--iq-primary), var(--iq-accent));
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: .9rem; flex-shrink: 0;
}
.iq-music-item .iq-mi-info { flex: 1; }
.iq-music-item .iq-mi-info strong { display:block; font-size:.88rem; font-weight:800; }
.iq-music-item .iq-mi-info span   { font-size:.75rem; color:#888; }
.iq-music-item .iq-mi-play {
  background: none; border: none;
  color: var(--iq-primary); font-size: 1rem; cursor: pointer;
}

/* ── DESIGN STEP ───────────────────────────────────────────── */
.iq-section-label {
  font-family: 'Nunito', sans-serif;
  font-size: 1rem;
  font-weight: 800;
  color: var(--iq-primary);
  letter-spacing: .03em;
  padding-bottom: .5rem;
  margin-bottom: 1rem;
  border-bottom: 2px solid var(--iq-light);
}

/* Color palette cards – compact / minimalist */
/* Color palette cards – 4 columnas con banda de color */
.iq-color-card {
  border: 2.5px solid #ece5f8;
  border-radius: 14px;
  cursor: pointer;
  transition: all .18s;
  background: #fff;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.iq-color-card:hover { border-color: var(--iq-primary); transform: translateY(-2px); box-shadow: 0 4px 14px rgba(123,47,190,.13); }
.iq-color-card.selected {
  border-color: var(--iq-primary);
  box-shadow: 0 4px 16px rgba(123,47,190,.25);
}
.iq-color-card.selected::after { display: none; }
/* Banda de color */
.iq-cc-band {
  height: 44px;
  display: flex;
  flex-shrink: 0;
}
.iq-cc-band span { flex: 1; }
/* Fila inferior: dots + nombre */
.iq-cc-bottom {
  display: flex;
  align-items: center;
  gap: .35rem;
  padding: .38rem .5rem;
}
.iq-cc-dots { display: flex; gap: .18rem; flex-shrink: 0; }
.iq-cc-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
  border: 1.5px solid rgba(255,255,255,.6);
}
.iq-cc-name {
  font-weight: 800;
  font-size: .7rem;
  color: var(--iq-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}

/* Animated bg cards */
.iq-anim-card {
  border: 3px solid #f0e8ff;
  border-radius: 18px;
  overflow: hidden;
  cursor: pointer;
  transition: all .2s;
  background: #fff;
}
.iq-anim-card:hover { transform: translateY(-4px); border-color: var(--iq-primary); }
.iq-anim-card.selected {
  border-color: var(--iq-primary);
  box-shadow: 0 6px 24px rgba(123,47,190,.25);
}
.iq-anim-card.selected::after {
  content: '✓ Elegido';
  display: block;
  text-align: center;
  font-size: .75rem;
  font-weight: 900;
  color: var(--iq-primary);
  padding: .3rem;
  background: #f0e8ff;
}
.iq-anim-canvas {
  display: block;
  width: 100%; height: 100px;
}
.iq-anim-label {
  padding: .5rem .8rem;
  font-weight: 800;
  font-size: .83rem;
  color: var(--iq-dark);
  text-align: center;
}

/* ── WIZARD BODY ───────────────────────────────────────────── */
.iq-wizard-body {
  padding: 2rem 2rem;
}
@media (min-width: 576px) { .iq-wizard-body { padding: 2.5rem 3rem; } }

/* ── DESIGN PREVIEW ────────────────────────────────────────── */
.iq-design-preview {
  background: var(--iq-light);
  border-radius: 20px;
  padding: 1.5rem;
  margin-top: 2rem;
}
.iq-dp-card {
  max-width: 480px;
  margin: 0 auto;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0,0,0,.15);
  position: relative;
  display: flex;
  flex-direction: column;
}
.iq-dp-bg {
  position: absolute; inset: 0;
  z-index: 0;
}
/* zona visible de fondo puro arriba de la tarjeta */
.iq-dp-bg-peek {
  height: 200px;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}
.iq-dp-content {
  position: relative; z-index: 1;
  padding: 1.5rem 1.5rem 2rem;
  text-align: center;
  background: rgba(255,255,255,.82);
  backdrop-filter: blur(10px);
  border-radius: 22px;
  margin: -22px 12px 12px;
}
.iq-dp-emoji { font-size: 3rem; }
.iq-dp-content h4 { font-weight: 900; margin: .3rem 0 .1rem; }
.iq-dp-content p  { color: #777; font-size: .88rem; margin: 0 0 .8rem; }
.iq-dp-tags {
  display: flex; flex-wrap: wrap; gap: .4rem;
  justify-content: center; margin-bottom: .8rem;
}
.iq-dp-tags span {
  background: rgba(123,47,190,.1);
  color: var(--iq-primary);
  border-radius: 30px;
  padding: .25rem .8rem;
  font-size: .78rem;
  font-weight: 700;
}
.iq-dp-text { font-size: .83rem; color: #555; font-style: italic; }

/* ── PERSONAJE TEMÁTICO EN PREVIEW ────────────────────────── */
.iq-dp-tematica-char {
  position: absolute;
  bottom: 0;
  right: -8px;
  width: 110px;
  height: auto;
  filter: drop-shadow(-3px 0 10px rgba(0,0,0,.22));
  pointer-events: none;
  z-index: 10;
  transform: translateY(5%);
}

/* ── CARDS PERSONAJES TEMÁTICOS ────────────────────────────── */
.iq-tematica-card {
  border: 3px solid #f0e8ff;
  border-radius: 18px;
  overflow: hidden;
  cursor: pointer;
  transition: all .2s;
  background: #fff;
}
.iq-tematica-card:hover { transform: translateY(-4px); border-color: var(--iq-primary); }
.iq-tematica-card.selected {
  border-color: var(--iq-primary);
  box-shadow: 0 6px 24px rgba(123,47,190,.25);
}
.iq-tematica-card.selected::after {
  content: '✓ Elegido';
  display: block;
  text-align: center;
  font-size: .75rem;
  font-weight: 900;
  color: var(--iq-primary);
  padding: .3rem;
  background: #f0e8ff;
}
.iq-tc-preview {
  height: 130px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: linear-gradient(160deg, #fce4f6 0%, #ffe3fc 100%);
  overflow: hidden;
  padding-top: .5rem;
}
.iq-tc-preview img {
  height: 120px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,.15));
}
.iq-tc-none {
  background: #f5f5f5;
  align-items: center;
}
.iq-tc-name {
  padding: .6rem .8rem;
  font-weight: 800;
  font-size: .83rem;
  color: var(--iq-dark);
  text-align: center;
}

/* ── BUTTONS ───────────────────────────────────────────────── */
/* ── BUTTONS: menos redondeo ──────────────────────────────── */
#step0 .btn, #step1 .btn { border-radius: 12px !important; }

.iq-btn-main {
  background: linear-gradient(135deg, var(--iq-primary), var(--iq-accent));
  color: #fff; border: none;
  box-shadow: 0 6px 25px rgba(123,47,190,.35);
  transition: transform .2s, box-shadow .2s;
}
.iq-btn-main:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 35px rgba(123,47,190,.45);
  color: #fff;
}
.iq-btn-success {
  background: linear-gradient(135deg, #06D6A0, #118AB2);
  color: #fff; border: none;
  box-shadow: 0 6px 25px rgba(6,214,160,.35);
  transition: transform .2s, box-shadow .2s;
}
.iq-btn-success:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 35px rgba(6,214,160,.45);
  color: #fff;
}

/* ── TEMATICA GROUP LABEL ─────────────────────────────────── */
.iq-tematica-group-label {
  font-size: .73rem;
  font-weight: 900;
  color: var(--iq-primary);
  text-transform: uppercase;
  letter-spacing: .07em;
  padding: .75rem .2rem .3rem;
  border-bottom: 1.5px solid #f0e8ff;
  margin-bottom: .4rem;
}

/* ── RESULT CARD ──────────────────────────────────────────── */
.iq-result-card {
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 8px 40px rgba(123,47,190,.15);
  border: 2px solid #e8d8ff;
  padding: 2.5rem 2rem;
  text-align: center;
  margin: 0 auto;
  max-width: 560px;
}
/* ── Vista previa sticky en desktop ─────── */
.iq-preview-sticky {
  position: sticky;
  top: 90px;
  display: flex;
  justify-content: center;
}
.iq-preview-sticky .iq-design-preview {
  border: none;
  background: transparent;
  padding: 0;
  margin: 0;
}
/* Teléfono más alto en columna sticky */
.iq-preview-sticky .iq-result-phone {
  width: 320px;
  height: 620px;
}

/* ── Phone mockup dentro del result card ── */
.iq-result-phone-wrap {
  display: flex;
  justify-content: center;
  margin: 1.2rem 0 1.5rem;
}
.iq-result-phone {
  width: 280px;
  height: 540px;
  background: #111;
  border-radius: 38px;
  border: 7px solid #222;
  box-shadow: 0 20px 60px rgba(0,0,0,.35), inset 0 0 0 2px rgba(255,255,255,.08);
  overflow: hidden;
  position: relative;
}
.iq-result-phone-notch {
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 72px; height: 20px;
  background: #111;
  border-radius: 0 0 12px 12px;
  z-index: 10;
  pointer-events: none;
}
.iq-result-phone-screen {
  width: 100%; height: 100%;
  overflow: hidden;
  background: #fff;
}
.iq-result-iframe {
  width: calc(100% + 17px);
  height: 100%;
  border: none;
  display: block;
}
.iq-result-icon { font-size: 2.5rem; margin-bottom: .5rem; }
.iq-result-title {
  font-weight: 900;
  color: var(--iq-dark);
  font-size: 1.3rem;
  margin-bottom: .3rem;
}
.iq-result-subtitle {
  color: #777;
  font-size: .9rem;
  margin-bottom: .8rem;
}
.iq-result-link {
  background: #f8f2ff;
  border: 2px solid #e8d8ff;
  border-radius: 14px;
  padding: .8rem 1rem;
  font-size: .82rem;
  font-weight: 700;
  color: #7B2FBE;
  word-break: break-all;
  cursor: pointer;
  transition: background .2s, color .2s;
  margin-bottom: .3rem;
  display: block;
}
.iq-result-link:hover { background: #ede0ff; }
