/* ── Six40 × Typeform Style ─────────────────────────────────────────────── */

:root {
  --tf-bg:        #000000;
  --tf-surface:   #0d0d0d;
  --tf-red:       #b11a2d;
  --tf-white:     #f8f1f1;
  --tf-muted:     rgba(248,241,241,.5);
  --tf-border:    rgba(248,241,241,.14);
  --tf-on-accent: #f8f1f1;
  --tf-error:     #ff6b6b;
  --tf-radius:    10px;
}

/* ── Contenedor ── */
.tf-wrap {
  background: var(--tf-bg);
  min-height: 100vh;          /* fullpage: ocupa el alto de la pantalla */
  position: relative;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--tf-white);
}

/* ── Barra de progreso ── */
.tf-progress {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: rgba(255,255,255,.08);
  z-index: 10;
}
.tf-progress-bar {
  height: 100%;
  background: var(--tf-red);
  transition: width 0.45s cubic-bezier(.4,0,.2,1);
  width: 0%;
}

/* ── Steps ── */
.tf-step {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 40px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(40px);
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(.4,0,.2,1);
  box-sizing: border-box;
}

.tf-step.active {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}

.tf-step.exit-up {
  opacity: 0;
  transform: translateY(-40px);
  pointer-events: none;
}

.tf-step.enter-down {
  opacity: 0;
  transform: translateY(40px);
  pointer-events: none;
}

.tf-step-inner {
  width: 100%;
  max-width: 580px;
}

/* ── Número de paso ── */
.tf-step-num {
  color: var(--tf-red);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  margin: 0 0 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.tf-arrow { opacity: .6; }

/* ── Pregunta ── */
.tf-question {
  font-size: clamp(22px, 4vw, 30px);
  font-weight: 800;
  margin: 0 0 10px;
  line-height: 1.25;
  color: var(--tf-white);
  /* La fuente de titulares del tema no incluye mayúsculas acentuadas (Ó, etc.);
     forzamos una con soporte completo para que se vean las tildes. */
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
}

.tf-sub {
  color: var(--tf-muted);
  font-size: 14px;
  margin: 0 0 28px;
}

/* ── Cards (opción) ── */
.tf-cards {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}
.tf-cards--2 { grid-template-columns: 1fr 1fr; }
.tf-cards--3 { grid-template-columns: repeat(3,1fr); }

.tf-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border: 1px solid var(--tf-border);
  border-radius: var(--tf-radius);
  background: rgba(255,255,255,.04);
  color: var(--tf-white);
  cursor: pointer;
  text-align: left;
  transition: all 0.18s ease;
  width: 100%;
}

.tf-card:hover {
  border-color: rgba(177,26,45,.5);
  background: rgba(177,26,45,.07);
}

.tf-card.selected {
  border-color: var(--tf-red);
  background: rgba(177,26,45,.12);
}

.tf-card-letter {
  width: 28px;
  height: 28px;
  border-radius: 5px;
  border: 1px solid var(--tf-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--tf-muted);
  flex-shrink: 0;
  transition: all 0.18s;
}

.tf-card.selected .tf-card-letter {
  background: var(--tf-red);
  border-color: var(--tf-red);
  color: var(--tf-on-accent);
}

.tf-card-content {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.tf-card-content strong {
  font-size: 15px;
  font-weight: 700;
  color: var(--tf-white);
}

.tf-card-content small {
  font-size: 12px;
  color: var(--tf-muted);
}

/* ── Barberos ── */
.tf-barber-cards {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 12px;
  margin-top: 24px;
}

.tf-barber-card {
  border: 1px solid var(--tf-border);
  border-radius: var(--tf-radius);
  padding: 18px 12px;
  text-align: center;
  cursor: pointer;
  background: rgba(255,255,255,.04);
  transition: all 0.18s;
  color: var(--tf-white);
}

.tf-barber-card:hover {
  border-color: rgba(177,26,45,.5);
  background: rgba(177,26,45,.07);
}

.tf-barber-card.selected {
  border-color: var(--tf-red);
  background: rgba(177,26,45,.12);
}

.tf-barber-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(255,255,255,.1);
  font-size: 20px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px;
  color: var(--tf-red);
  transition: all 0.18s;
}

.tf-barber-card.selected .tf-barber-avatar {
  background: var(--tf-red);
  color: var(--tf-on-accent);
}

/* Avatar con foto del barbero */
.tf-barber-avatar--img {
  overflow: hidden;
  background: rgba(255,255,255,.06);
}

.tf-barber-avatar--img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.tf-barber-card.selected .tf-barber-avatar--img {
  background: rgba(255,255,255,.06);
  box-shadow: 0 0 0 2px var(--tf-red);
}

.tf-barber-name {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
}

/* ── Input fecha ── */
.tf-date-input {
  display: block;
  margin-top: 24px;
  background: transparent;
  border: none;
  border-bottom: 2px solid rgba(255,255,255,.2);
  color: var(--tf-white);
  font-size: 28px;
  font-weight: 700;
  padding: 8px 0;
  width: 100%;
  outline: none;
  transition: border-color 0.2s;
  color-scheme: dark;
}

.tf-date-input:focus {
  border-bottom-color: var(--tf-red);
}

/* ── Input texto ── */
.tf-text-input {
  display: block;
  margin-top: 24px;
  background: transparent;
  border: none;
  border-bottom: 2px solid rgba(255,255,255,.2);
  color: var(--tf-white);
  font-size: 26px;
  font-weight: 600;
  padding: 8px 0;
  width: 100%;
  outline: none;
  transition: border-color 0.2s;
}

.tf-text-input::placeholder { color: rgba(255,255,255,.2); font-weight: 400; }
.tf-text-input:focus { border-bottom-color: var(--tf-red); }

/* ── Slots ── */
.tf-slots-grid {
  display: grid;
  grid-template-columns: repeat(5,1fr);
  gap: 8px;
  margin-top: 24px;
}

.tf-slot {
  border: 1px solid var(--tf-border);
  background: rgba(255,255,255,.04);
  border-radius: 6px;
  padding: 12px 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--tf-white);
  cursor: pointer;
  text-align: center;
  transition: all 0.15s;
}

.tf-slot:hover {
  border-color: rgba(177,26,45,.5);
  background: rgba(177,26,45,.07);
}

.tf-slot.selected {
  background: var(--tf-red);
  border-color: var(--tf-red);
  color: var(--tf-on-accent);
  font-weight: 700;
}

.tf-slots-loading {
  color: var(--tf-muted);
  font-size: 14px;
  margin-top: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.tf-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,.15);
  border-top-color: var(--tf-red);
  border-radius: 50%;
  animation: tfspin 0.6s linear infinite;
}

@keyframes tfspin { to { transform: rotate(360deg); } }

.tf-no-slots {
  margin-top: 24px;
  color: #ff9f6b;
  font-size: 14px;
  padding: 12px 16px;
  background: rgba(255,111,64,.1);
  border-radius: 6px;
  border: 1px solid rgba(255,111,64,.2);
}

/* ── Acciones ── */
.tf-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 24px;
}

.tf-btn-ok {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--tf-red);
  color: var(--tf-on-accent);
  border: none;
  border-radius: 6px;
  padding: 10px 20px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.15s;
}

.tf-btn-ok:hover { opacity: 0.85; }
.tf-btn-home { text-decoration: none; }

/* El tema aplica su color de enlace (rojo) al hover, y el texto desaparece
   sobre el fondo rojo del botón. Forzamos el texto claro en todos los estados. */
.tf-wrap .tf-btn-home,
.tf-wrap .tf-btn-home:hover,
.tf-wrap .tf-btn-home:focus,
.tf-wrap .tf-btn-home:active,
.tf-wrap .tf-btn-home:visited {
  color: var(--tf-on-accent) !important;
  text-decoration: none !important;
}

.tf-check {
  font-size: 14px;
  font-weight: 900;
}

.tf-hint {
  color: var(--tf-muted);
  font-size: 12px;
}

.tf-hint kbd {
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 11px;
  font-family: inherit;
}

/* ── Resumen ── */
.tf-summary-grid {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--tf-border);
  border-radius: var(--tf-radius);
  overflow: hidden;
}

.tf-summary-item {
  display: flex;
  align-items: center;
  padding: 13px 18px;
  border-bottom: 1px solid var(--tf-border);
  gap: 16px;
}

.tf-summary-item:last-child { border-bottom: 0; }

.tf-sum-label {
  width: 120px;
  flex-shrink: 0;
  color: var(--tf-muted);
  font-size: 13px;
}

.tf-sum-value {
  font-weight: 600;
  font-size: 14px;
  color: var(--tf-white);
}

/* ── Botón submit ── */
.tf-btn-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 24px;
  padding: 16px;
  background: var(--tf-red);
  color: var(--tf-on-accent);
  border: none;
  border-radius: 10px;
  font-size: 17px;
  font-weight: 800;
  cursor: pointer;
  letter-spacing: .3px;
  transition: opacity 0.15s;
}

.tf-btn-submit:hover { opacity: .88; }
.tf-btn-submit:disabled { opacity: .5; cursor: not-allowed; }

/* ── Errores ── */
.tf-error {
  color: var(--tf-error);
  font-size: 13px;
  margin: 8px 0 0;
  min-height: 18px;
}

.tf-error--global {
  margin-top: 16px;
  background: rgba(255,107,107,.1);
  border: 1px solid rgba(255,107,107,.2);
  border-radius: 6px;
  padding: 12px 16px;
}

.tf-muted { color: var(--tf-muted); font-size: 14px; margin-top: 24px; }
.tf-hidden { display: none !important; }

/* ── Navegación ── */
.tf-nav {
  position: absolute;
  bottom: 20px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 10;
}

.tf-nav-btn {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  border: 1px solid var(--tf-border);
  background: rgba(255,255,255,.06);
  color: var(--tf-white);
  cursor: pointer;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.tf-nav-btn:hover {
  background: rgba(177,26,45,.15);
  border-color: rgba(177,26,45,.4);
}

.tf-nav-btn:disabled { opacity: .25; cursor: default; }

/* ── Éxito ── */
.tf-success {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--tf-bg);
}

.tf-success-inner {
  text-align: center;
  padding: 40px;
}

.tf-success-logo {
  display: block;
  width: 160px;
  max-width: 60%;
  height: auto;
  margin: 0 auto 28px;
}

.tf-success-check {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--tf-red);
  color: var(--tf-on-accent);
  font-size: 32px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  animation: popIn 0.4s cubic-bezier(.4,0,.2,1);
}

@keyframes popIn {
  from { transform: scale(.5); opacity: 0; }
  to   { transform: scale(1);  opacity: 1; }
}

.tf-success-inner h2 {
  font-size: 26px;
  font-weight: 800;
  margin: 0 0 12px;
}

.tf-success-inner p {
  color: var(--tf-muted);
  font-size: 15px;
  margin: 0 0 32px;
}

/* ── Pasos anchos (servicios, calendario, datos) ── */
.tf-step-inner--wide { max-width: 760px; }
.tf-step { overflow-y: auto; }
.tf-step[data-step="4"],
.tf-step[data-step="5"],
.tf-step[data-step="6"] { align-items: flex-start; }

/* ── Menú de servicios (menú libre) ── */
.tf-svc-cat { margin-top: 22px; }
.tf-svc-cat-title {
  color: var(--tf-red);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin: 0 0 10px;
}
.tf-svc-list { display: flex; flex-direction: column; gap: 8px; }
.tf-svc-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--tf-border);
  border-radius: var(--tf-radius);
  background: rgba(255,255,255,.04);
  cursor: pointer;
  transition: all 0.15s;
}
.tf-svc-item:hover { border-color: rgba(177,26,45,.4); }

/* Servicio incompatible (rapado ↔ tratamiento del pelo): gris y no clicable */
.tf-svc-item.tf-svc-disabled {
  opacity: .4;
  pointer-events: none;
}

.tf-svc-note {
  margin: 10px 2px 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--tf-muted);
}
.tf-svc-item:has(.tf-service-input:checked) {
  border-color: var(--tf-red);
  background: rgba(177,26,45,.1);
}
.tf-service-input {
  position: absolute;
  opacity: 0;
  width: 0; height: 0;
  pointer-events: none;
}
.tf-svc-check {
  width: 22px; height: 22px;
  border-radius: 6px;
  border: 2px solid rgba(255,255,255,.25);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.tf-service-input:checked + .tf-svc-check {
  background: var(--tf-red);
  border-color: var(--tf-red);
}
.tf-service-input:checked + .tf-svc-check::after {
  content: '✓';
  color: var(--tf-on-accent);
  font-size: 13px;
  font-weight: 900;
}
.tf-svc-info { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tf-svc-name { font-weight: 600; font-size: 14px; color: var(--tf-white); }
.tf-svc-meta { font-size: 12px; color: var(--tf-muted); }
.tf-svc-price { font-weight: 700; color: var(--tf-red); font-size: 14px; white-space: nowrap; }

/* ── Precio orientativo (informativo) ── */
.tf-estimate { display: flex; flex-direction: column; margin-right: auto; }
.tf-estimate-label { font-size: 11px; color: var(--tf-muted); text-transform: uppercase; letter-spacing: .5px; }
.tf-estimate-value { font-size: 17px; font-weight: 800; color: var(--tf-white); }
.tf-estimate-note { font-size: 11px; color: var(--tf-muted); }

/* ── Calendario (fecha + hora) ── */
.tf-cal-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin-top: 24px;
}
.tf-cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.tf-cal-title { font-weight: 700; text-transform: capitalize; font-size: 15px; }
.tf-cal-nav {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 1px solid var(--tf-border);
  background: rgba(255,255,255,.04);
  color: var(--tf-white);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  transition: all 0.15s;
}
.tf-cal-nav:hover:not(:disabled) { background: rgba(177,26,45,.15); border-color: rgba(177,26,45,.4); }
.tf-cal-nav:disabled { opacity: .25; cursor: default; }
.tf-cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7,1fr);
  gap: 4px;
  margin-bottom: 6px;
}
.tf-cal-weekdays span { text-align: center; font-size: 11px; color: var(--tf-muted); }
.tf-cal-grid { display: grid; grid-template-columns: repeat(7,1fr); gap: 4px; }
.tf-cal-cell {
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tf-cal-day {
  width: 100%; height: 100%;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,.05);
  color: var(--tf-white);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.15s;
}
.tf-cal-day:hover:not(.tf-cal-disabled) { background: rgba(177,26,45,.18); }
.tf-cal-day.tf-cal-selected { background: var(--tf-red); color: var(--tf-on-accent); }
.tf-cal-disabled { opacity: .22; cursor: default; background: transparent; }
.tf-cal-day.tf-cal-closed { text-decoration: line-through; }
.tf-slots-panel { max-height: 380px; overflow-y: auto; }
.tf-slots-day { font-weight: 700; margin: 0 0 12px; text-transform: capitalize; font-size: 15px; color: var(--tf-white); }
.tf-slots-panel .tf-slots-grid { grid-template-columns: repeat(3,1fr); margin-top: 0; }
.tf-slots-panel .tf-muted,
.tf-slots-panel .tf-no-slots { margin-top: 0; }

/* ── Formulario de datos ── */
.tf-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 24px;
  margin-top: 20px;
}
.tf-form-grid .tf-field:nth-child(1) { grid-column: 1 / -1; }
.tf-field { display: flex; flex-direction: column; }
.tf-label { font-size: 13px; color: var(--tf-muted); margin-bottom: 2px; }
.tf-field .tf-text-input { margin-top: 4px; font-size: 18px; }

/* ── Caja resumen (paso datos) ── */
.tf-summary-box { margin-top: 26px; }
.tf-summary-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--tf-red);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 0 0 12px;
}
.tf-summary-box .tf-summary-grid { margin-top: 0; }
.tf-summary-total .tf-sum-value { color: var(--tf-red); font-weight: 800; }

/* ── Responsive ── */
@media (max-width: 600px) {
  .tf-wrap { border-radius: 0; min-height: 100dvh; }
  .tf-step { padding: 48px 24px 80px; align-items: flex-start; padding-top: 72px; }
  .tf-cards--2, .tf-cards--3 { grid-template-columns: 1fr; }
  .tf-barber-cards { grid-template-columns: repeat(2,1fr); }
  .tf-slots-grid { grid-template-columns: repeat(4,1fr); }
  .tf-question { font-size: 22px; }
  .tf-cal-layout { grid-template-columns: 1fr; }
  .tf-form-grid { grid-template-columns: 1fr; }
  .tf-form-grid .tf-field:nth-child(1) { grid-column: auto; }
  .tf-slots-panel { max-height: none; }
  .tf-slots-panel .tf-slots-grid { grid-template-columns: repeat(4,1fr); }
  .tf-actions { flex-wrap: wrap; }
}
