/* ============================================
   BASE.CSS - Estilos base para formularios
   ============================================ */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --primary-dark: #3B2667;
  --primary-mid: #573D81;
  --primary-accent: #BC50DA;
  --primary-deep: #5A1F94;
  --bg-start: #1a1025;
  --bg-end: #2d1f47;
  --text: #fff;
  --text-sec: rgba(255,255,255,.7);
  --text-muted: rgba(255,255,255,.5);
  --orange: #f97316;
  --green: #4ade80;
  --error: #f87171;
}

html, body {
  height: 100%;
  width: 100%;
  font-family: 'DM Sans', sans-serif;
  background: linear-gradient(135deg, var(--bg-start), var(--bg-end), var(--primary-dark));
  color: var(--text);
  overflow-x: hidden;
}

/* Orbes animados de fondo */
.orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  opacity: .4;
  pointer-events: none;
  z-index: 0;
}
.orb-1 {
  width: 400px;
  height: 400px;
  background: var(--primary-accent);
  top: -100px;
  right: -100px;
  animation: float 15s ease-in-out infinite;
}
.orb-2 {
  width: 300px;
  height: 300px;
  background: var(--primary-deep);
  bottom: -50px;
  left: -50px;
  animation: float 20s ease-in-out infinite reverse;
}
@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-20px, 20px) scale(.95); }
}

/* Layout principal */
#app {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

header {
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 18px;
}
.progress-text {
  font-size: 14px;
  color: var(--text-muted);
}

main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px 40px 80px;
}
@media (max-width: 768px) {
  main { padding-left: 48px; }
}

.content {
  width: 100%;
  max-width: 600px;
  animation: slideIn .4s ease;
}
@keyframes slideIn {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Títulos y subtítulos */
.q-title {
  font-size: 26px;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 8px;
  font-family: 'Space Grotesk', sans-serif;
}
@media (max-width: 768px) {
  .q-title { font-size: 22px; }
}
.q-sub {
  font-size: 15px;
  color: var(--text-sec);
  margin-bottom: 24px;
  line-height: 1.5;
}

/* Pantalla de bienvenida */
.welcome-icon { font-size: 48px; margin-bottom: 16px; }
.welcome-text {
  text-align: center;
  max-width: 500px;
  margin: 0 auto;
}
.welcome-text .q-sub { white-space: pre-line; }

/* Inputs */
input[type="text"],
input[type="email"],
input[type="date"],
input[type="number"],
textarea {
  width: 100%;
  padding: 14px 18px;
  font-size: 16px;
  font-family: 'DM Sans', sans-serif;
  background: rgba(255,255,255,.08);
  border: 2px solid rgba(255,255,255,.15);
  border-radius: 10px;
  color: #fff;
  transition: all .3s;
}
input:focus, textarea:focus {
  border-color: var(--primary-accent);
  background: rgba(255,255,255,.12);
  outline: none;
  box-shadow: 0 0 20px rgba(188,80,218,.2);
}
input::placeholder, textarea::placeholder {
  color: var(--text-muted);
}
textarea {
  min-height: 100px;
  resize: vertical;
}
input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(1);
  cursor: pointer;
}

/* Grupos de campos */
.field-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 8px;
}
.field-row {
  display: flex;
  gap: 12px;
}
.field-row > * { flex: 1; }
@media (max-width: 500px) {
  .field-row { flex-direction: column; }
}
.field-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
  display: block;
}

/* Opciones de selección */
.choices {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.choice {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: rgba(255,255,255,.08);
  border: 2px solid rgba(255,255,255,.15);
  border-radius: 10px;
  cursor: pointer;
  transition: all .3s;
}
.choice:hover {
  border-color: rgba(255,255,255,.3);
  transform: translateX(6px);
}
.choice.selected {
  border-color: var(--primary-accent);
  background: rgba(188,80,218,.15);
}
.choice-key {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,.1);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
}
.choice.selected .choice-key {
  background: var(--primary-accent);
}

/* Botones de navegación */
.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 32px;
  gap: 16px;
}
.btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  font-size: 15px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all .3s;
}
.btn:disabled {
  opacity: .3;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}
.btn-back {
  background: rgba(255,255,255,.1);
  color: #fff;
}
.btn-back:hover:not(:disabled) {
  background: rgba(255,255,255,.2);
}
.btn-next {
  background: linear-gradient(135deg, var(--primary-accent), var(--primary-deep));
  color: #fff;
  box-shadow: 0 4px 20px rgba(188,80,218,.4);
}
.btn-next:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(188,80,218,.5);
}
.btn-pay {
  background: linear-gradient(135deg, #4ade80, #22c55e);
  box-shadow: 0 4px 20px rgba(74,222,128,.4);
}
.btn-pay:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(74,222,128,.5);
}

/* Barra de progreso lateral */
.progress {
  position: fixed;
  left: 24px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 100;
}
@media (max-width: 768px) {
  .progress { left: 12px; }
}

.progress-track {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
@media (max-width: 768px) {
  .progress-track { gap: 7px; }
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  cursor: pointer;
  transition: all .3s;
  border: 2px solid transparent;
  position: relative;
  z-index: 2;
  background: rgba(255,255,255,.2);
}
@media (max-width: 768px) {
  .dot { width: 9px; height: 9px; }
}
.dot:hover { transform: scale(1.3); }

/* Estados de los puntos */
.dot.done {
  background: var(--primary-accent);
  border-color: var(--primary-accent);
}
.dot.current {
  background: var(--primary-accent);
  border: 2px solid #fff;
  transform: scale(1.4);
  box-shadow: 0 0 15px var(--primary-accent);
}
.dot.pending {
  background: var(--orange);
  border-color: var(--orange);
}
.dot.future {
  background: rgba(255,255,255,.2);
}

.progress-line {
  position: absolute;
  width: 3px;
  background: linear-gradient(180deg, var(--primary-accent), var(--primary-deep));
  left: 50%;
  transform: translateX(-50%);
  border-radius: 2px;
  transition: height 0.3s ease;
}

/* Pantalla de error */
.error-screen { text-align: center; }
.error-screen .q-title { color: var(--error); }

/* Mensaje de validación */
.validation-error {
  color: var(--error);
  font-size: 13px;
  margin-top: 12px;
  padding: 10px;
  background: rgba(248,113,113,.1);
  border-radius: 8px;
  border: 1px solid rgba(248,113,113,.3);
}

/* Resumen */
.summary-list {
  max-height: 40vh;
  overflow-y: auto;
  margin: 20px 0;
}
.summary-item {
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.summary-label {
  color: var(--text-muted);
  font-size: 12px;
}
.price-box {
  background: linear-gradient(135deg, rgba(188,80,218,.2), rgba(90,31,148,.2));
  border: 2px solid var(--primary-accent);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  margin: 20px 0;
}
.price-label {
  color: var(--text-sec);
  font-size: 14px;
}
.price-amount {
  font-size: 32px;
  font-weight: 700;
  font-family: 'Space Grotesk', sans-serif;
}
.price-currency {
  font-size: 16px;
  color: var(--text-sec);
}

/* Campo de fecha manual con botón de calendario */
.date-manual-container {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.date-picker-btn {
  background: rgba(255,255,255,.1);
  border: 2px solid rgba(255,255,255,.15);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 18px;
  cursor: pointer;
  transition: all .3s;
}

.date-picker-btn:hover {
  background: rgba(255,255,255,.2);
  border-color: var(--primary-accent);
}

/* Hint debajo de campos especiales */
.field-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 8px;
}

/* ============================================
   MODAL DE TÉRMINOS Y CONDICIONES
   ============================================ */
.terms-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(26, 16, 37, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.terms-modal {
  background: linear-gradient(135deg, var(--bg-start), var(--bg-end));
  border: 2px solid var(--primary-accent);
  border-radius: 16px;
  max-width: 600px;
  width: 100%;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 40px rgba(188,80,218,0.2);
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.terms-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.terms-modal-header h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}

.terms-modal-close {
  background: rgba(255,255,255,0.1);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text);
  font-size: 20px;
  transition: all 0.3s;
}

.terms-modal-close:hover {
  background: rgba(255,255,255,0.2);
  transform: scale(1.1);
}

.terms-modal-content {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-sec);
}

.terms-modal-content p {
  margin-bottom: 16px;
}

.terms-modal-content p:last-child {
  margin-bottom: 0;
}

/* Link para abrir términos */
.terms-link {
  color: var(--primary-accent);
  text-decoration: underline;
  cursor: pointer;
  transition: color 0.2s;
}

.terms-link:hover {
  color: #d670f0;
}

/* ============================================
   TARJETAS DE ASESORÍA
   ============================================ */
.asesoria-cards {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.asesoria-card {
  background: rgba(255,255,255,0.05);
  border: 2px solid rgba(255,255,255,0.15);
  border-radius: 16px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.3s;
}

.asesoria-card:hover {
  border-color: rgba(255,255,255,0.3);
  transform: translateY(-2px);
}

.asesoria-card.selected {
  border-color: var(--primary-accent);
  background: rgba(188,80,218,0.15);
  box-shadow: 0 0 25px rgba(188,80,218,0.2);
}

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

.asesoria-card-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 20px;
  font-weight: 600;
  color: #fff;
}

.asesoria-card.selected .asesoria-card-title {
  color: var(--primary-accent);
}

.asesoria-card-price {
  background: linear-gradient(135deg, var(--primary-accent), var(--primary-deep));
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
}

.asesoria-card-desc {
  color: var(--text-sec);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 12px;
}

.asesoria-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.asesoria-usdt {
  color: #4ade80;
  font-size: 13px;
}

.asesoria-info-btn {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: var(--primary-accent);
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.3s;
}

.asesoria-info-btn:hover {
  background: rgba(188,80,218,0.2);
  border-color: var(--primary-accent);
}

/* ============================================
   CHECKBOX PARA MULTI SELECT
   ============================================ */
.choice.checkbox {
  justify-content: flex-start;
  gap: 12px;
}

.choice.checkbox .checkbox-icon {
  font-size: 18px;
  min-width: 24px;
}

.choice.checkbox .choice-key {
  display: none;
}

/* ============================================
   BOTÓN VOLVER A SERVICIOS
   ============================================ */
.welcome-back-container {
  width: 100%;
  margin-bottom: 24px;
  text-align: left;
}

.back-to-services {
  padding: 8px 16px !important;
  font-size: 13px !important;
  opacity: 0.7;
  transition: opacity 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.back-to-services:hover {
  opacity: 1;
}

@media (max-width: 768px) {
  .welcome-back-container {
    margin-bottom: 20px;
  }

  .back-to-services {
    padding: 6px 12px !important;
    font-size: 12px !important;
  }
}

/* ============================================
   EXTRAS SELECT — switches modernos (EIN / Web)
   ============================================ */
.extras-block {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 8px;
}

/* Tarjeta padre que contiene una "fila" de opción */
.extras-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px;
  padding: 18px 20px;
  transition: border-color .2s, background .2s, transform .15s;
}
.extras-card:hover {
  border-color: rgba(188,80,218,0.35);
  background: rgba(255,255,255,0.06);
}
.extras-card.active {
  border-color: var(--primary-accent);
  background: rgba(188,80,218,0.10);
}

.extras-card-row {
  display: flex;
  align-items: center;
  gap: 16px;
}
.extras-card-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.extras-card-title {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.extras-card-price {
  font-size: 12px;
  font-weight: 600;
  background: rgba(74,222,128,0.15);
  color: #4ade80;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
}
.extras-card-desc {
  font-size: 13px;
  color: var(--text-sec);
  line-height: 1.45;
}

/* Selector tipo segmento (EIN Estándar / Express) */
.extras-segment {
  display: inline-flex;
  position: relative;
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 999px;
  padding: 4px;
  gap: 0;
  user-select: none;
  width: 100%;
  max-width: 320px;
}
.extras-segment-option {
  flex: 1;
  position: relative;
  z-index: 2;
  background: transparent;
  border: 0;
  color: var(--text-sec);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 13px;
  padding: 9px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: color .2s;
  white-space: nowrap;
}
.extras-segment-option.active {
  color: #fff;
}
.extras-segment-option:hover:not(.active) {
  color: rgba(255,255,255,0.9);
}
.extras-segment-thumb {
  position: absolute;
  top: 4px;
  bottom: 4px;
  width: calc(50% - 4px);
  background: linear-gradient(135deg, var(--primary-accent), var(--primary-deep));
  border-radius: 999px;
  transition: transform .25s cubic-bezier(.4,0,.2,1);
  z-index: 1;
  box-shadow: 0 2px 12px rgba(188,80,218,0.4);
}
.extras-segment[data-active="express"] .extras-segment-thumb {
  transform: translateX(100%);
}

.extras-segment-meta {
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
}
.extras-segment-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Switch (toggle) iOS-style para la web */
.extras-switch {
  position: relative;
  width: 50px;
  height: 28px;
  flex-shrink: 0;
  cursor: pointer;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 999px;
  transition: background .25s, border-color .25s;
}
.extras-switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 22px;
  height: 22px;
  background: #fff;
  border-radius: 50%;
  transition: transform .25s cubic-bezier(.4,0,.2,1);
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}
.extras-switch.active {
  background: linear-gradient(135deg, var(--primary-accent), var(--primary-deep));
  border-color: transparent;
}
.extras-switch.active::after {
  transform: translateX(22px);
}

/* Caja del total dinámico */
.extras-total {
  margin-top: 18px;
  padding: 14px 18px;
  background: rgba(255,255,255,0.03);
  border: 1px dashed rgba(255,255,255,0.18);
  border-radius: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.extras-total-label {
  font-size: 13px;
  color: var(--text-sec);
}
.extras-total-amount {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 22px;
  font-weight: 700;
}
.extras-total-amount .currency {
  font-size: 13px;
  color: var(--text-sec);
  margin-left: 4px;
}

.extras-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
  font-style: italic;
}

/* Bloque revelable: input que aparece al activar un switch (p.ej. URL de la web) */
.extras-reveal {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed rgba(255,255,255,0.12);
  animation: extrasRevealIn .25s ease;
}
.extras-reveal-input {
  width: 100%;
  max-width: 360px;
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.15);
  color: #fff;
  padding: 10px 14px;
  border-radius: 10px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  outline: none;
  transition: border-color .2s, background .2s;
}
.extras-reveal-input:focus {
  border-color: var(--primary-accent);
  background: rgba(0,0,0,0.35);
}
.extras-reveal-input::placeholder {
  color: var(--text-muted);
}
@keyframes extrasRevealIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Botón "Continuar" remarcado cuando el paso es opcional (siempre clickable) */
.btn-next.btn-glow {
  background: linear-gradient(135deg, var(--primary-accent), var(--primary-deep));
  box-shadow: 0 4px 18px rgba(188,80,218,0.45);
  border-color: transparent;
  color: #fff;
  font-weight: 600;
}
.btn-next.btn-glow:hover {
  box-shadow: 0 6px 22px rgba(188,80,218,0.6);
  transform: translateY(-1px);
}

@media (max-width: 768px) {
  .extras-card { padding: 14px 16px; }
  .extras-card-title { font-size: 15px; }
  .extras-card-desc { font-size: 12px; }
  .extras-segment-option { font-size: 12px; padding: 8px 10px; }
  .extras-total-amount { font-size: 20px; }
}
