/* CIT Tamizaje Wizard v3.0.0 */

/* ── BASE ── */
.cit-wizard-container {
  max-width: 680px;
  margin: 0 auto 40px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: #1e293b;
  position: relative;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 8px 48px rgba(0,48,93,.13), 0 1px 3px rgba(0,48,93,.08);
  overflow: hidden;
}

/* ── HERO ── */
.cit-wizard-hero {
  background: linear-gradient(135deg, #00305d 0%, #1a6fa8 100%);
  padding: 36px 32px 28px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cit-wizard-hero::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 200px; height: 200px;
  background: rgba(255,255,255,.06);
  border-radius: 50%;
}
.cit-wizard-hero::after {
  content: '';
  position: absolute;
  bottom: -60px; left: -20px;
  width: 160px; height: 160px;
  background: rgba(255,255,255,.04);
  border-radius: 50%;
}
.cit-wizard-logo {
  height: 44px;
  width: auto;
  display: block;
  margin: 30px auto 16px;
  filter: brightness(0) invert(1);
}
.cit-wizard-hero-title {
  color: #fff;
  font-size: 1.6rem;
  font-weight: 800;
  margin: 0 0 6px;
  position: relative;
  z-index: 1;
}
.cit-wizard-hero-sub {
  color: rgba(255,255,255,.75);
  font-size: 13px;
  margin: 0 0 16px;
  position: relative;
  z-index: 1;
}
.cit-wizard-hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  position: relative;
  z-index: 1;
}
.cit-chip {
  background: rgba(255,255,255,.15);
  color: rgba(255,255,255,.9);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 99px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 500;
  backdrop-filter: blur(4px);
}

/* ── PROGRESS ── */
.cit-progress-wrap {
  padding: 20px 32px 4px;
  background: #fff;
}
.cit-progress-bar {
  height: 5px;
  background: #e2e8f0;
  border-radius: 99px;
  overflow: hidden;
}
.cit-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #00305d, #1a6fa8);
  border-radius: 99px;
  transition: width 0.4s ease;
  width: 0%;
}
.cit-step-label {
  text-align: right;
  font-size: 11px;
  color: #94a3b8;
  margin: 6px 0 0;
  letter-spacing: .02em;
}

/* ── STEP WRAPPER ── */
.cit-step {
  padding: 28px 32px 32px;
}

/* ── STEP TITLES ── */
.cit-step-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: #00305d;
  margin: 0 0 6px;
  line-height: 1.2;
}
.cit-step-desc {
  color: #64748b;
  margin: 0 0 24px;
  font-size: 14px;
  line-height: 1.6;
}
.cit-badge {
  font-size: 0.7rem;
  background: #dbeafe;
  color: #1d4ed8;
  padding: 3px 10px;
  border-radius: 99px;
  vertical-align: middle;
  font-weight: 600;
  margin-left: 8px;
}
.cit-badge-opt {
  font-size: 0.65rem;
  background: #f0fdf4;
  color: #16a34a;
  padding: 3px 10px;
  border-radius: 99px;
  vertical-align: middle;
  font-weight: 600;
  margin-left: 8px;
}

/* ── FORM FIELDS ── */
.cit-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.cit-field-group {
  margin-bottom: 18px;
  position: relative;
}
.cit-field-group > label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  color: #374151;
  margin-bottom: 6px;
}
.cit-req {
  color: #dc2626;
}
.cit-hint-text {
  color: #94a3b8;
  font-size: 12px;
  font-weight: 400;
}
.cit-input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  font-size: 15px;
  color: #1e293b;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
}
.cit-input:focus {
  outline: none;
  border-color: #00305d;
  box-shadow: 0 0 0 3px rgba(0,48,93,0.1);
}
.cit-input.cit-input-error {
  border-color: #dc2626 !important;
  box-shadow: 0 0 0 3px rgba(220,38,38,0.08) !important;
}
.cit-textarea {
  min-height: 80px;
  resize: vertical;
}
.cit-date-input {
  color: #1e293b;
  cursor: pointer;
}
.cit-date-input::-webkit-calendar-picker-indicator {
  opacity: 0.6;
  cursor: pointer;
}

/* ── FIELD ERRORS & HINTS ── */
.cit-field-error {
  display: none;
  color: #dc2626;
  font-size: 12px;
  font-weight: 500;
  margin-top: 5px;
  padding-left: 2px;
  line-height: 1.4;
}
.cit-field-hint {
  display: block;
  color: #64748b;
  font-size: 12px;
  margin-top: 5px;
}

/* ── PHONE FIELD ── */
.cit-phone-wrap {
  display: flex;
  gap: 0;
  position: relative;
}
.cit-country-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 11px 12px;
  border: 1.5px solid #e2e8f0;
  border-right: none;
  border-radius: 10px 0 0 10px;
  background: #f8fafc;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: #374151;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s;
  min-width: 90px;
}
.cit-country-btn:hover { background: #f0f9ff; border-color: #00305d; }
.cit-chevron { color: #94a3b8; flex-shrink: 0; }
.cit-phone-input { border-radius: 0 10px 10px 0; flex: 1; }
.cit-country-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  width: 280px;
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  z-index: 200;
  overflow: hidden;
}
.cit-country-search-wrap {
  padding: 10px 10px 6px;
  border-bottom: 1px solid #f1f5f9;
}
.cit-country-list {
  max-height: 220px;
  overflow-y: auto;
}
.cit-country-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.1s;
}
.cit-country-item:hover { background: #f0f9ff; }
.cit-country-item.selected { background: #e0f2fe; font-weight: 600; }
.cit-country-name { flex: 1; color: #1e293b; }
.cit-country-dial { color: #64748b; font-size: 13px; font-weight: 500; }

/* ── RADIO CARDS ── */
.cit-radio-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.cit-radio-card-sm {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
  transition: border-color 0.15s, background 0.15s;
  user-select: none;
  background: #fff;
}
.cit-radio-card-sm:hover { border-color: #1a6fa8; background: #f0f9ff; }
.cit-radio-card-sm:has(input:checked) { border-color: #00305d; background: #e0f2fe; font-weight: 600; color: #00305d; }
.cit-radio-card-sm input[type="radio"] { accent-color: #00305d; width: 16px; height: 16px; }

.cit-radio-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cit-radio-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
  transition: border-color 0.15s, background 0.15s;
  user-select: none;
  background: #fff;
  line-height: 1.4;
}
.cit-radio-card:hover { border-color: #1a6fa8; background: #f0f9ff; }
.cit-radio-card:has(input:checked) { border-color: #00305d; background: #e0f2fe; font-weight: 600; color: #00305d; }
.cit-radio-card input[type="radio"] { accent-color: #00305d; flex-shrink: 0; width: 16px; height: 16px; }

/* ── CHECKBOX CARDS ── */
.cit-check-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cit-check-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 16px;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
  transition: border-color 0.15s, background 0.15s;
  user-select: none;
  background: #fff;
  line-height: 1.4;
}
.cit-check-card:hover { border-color: #1a6fa8; background: #f0f9ff; }
.cit-check-card:has(input:checked) { border-color: #00305d; background: #e0f2fe; font-weight: 600; color: #00305d; }
.cit-check-card input[type="checkbox"] { accent-color: #00305d; margin-top: 1px; flex-shrink: 0; width: 16px; height: 16px; }

/* ── QUESTIONS ── */
.cit-question-block {
  margin-bottom: 28px;
  padding-bottom: 28px;
  border-bottom: 1px solid #f1f5f9;
}
.cit-question-block:last-of-type { border-bottom: none; margin-bottom: 0; }
.cit-q-label {
  font-weight: 600;
  font-size: 15px;
  color: #1e293b;
  margin: 0 0 12px;
  line-height: 1.5;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.cit-q-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  background: #00305d;
  color: #fff;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

/* ── BUTTONS ── */
.cit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.15s;
  text-decoration: none;
  line-height: 1;
}
.cit-btn-primary {
  background: #00305d;
  color: #fff;
  border-color: #00305d;
}
.cit-btn-primary:hover { background: #004d99; border-color: #004d99; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,48,93,.25); }
.cit-btn-outline {
  background: #fff;
  color: #00305d;
  border-color: #00305d;
}
.cit-btn-outline:hover { background: #f0f9ff; }
.cit-btn-full { width: 100%; }
.cit-btn-sm { padding: 9px 18px; font-size: 14px; }
.cit-nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid #f1f5f9;
  flex-wrap: wrap;
}
.cit-nav-single { justify-content: center; }
.cit-upload-btn { padding: 8px 18px; font-size: 14px; }

/* ── OTP CARD ── */
.cit-otp-card {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 4px;
}
.cit-otp-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 16px;
}
.cit-otp-icon { font-size: 1.8rem; flex-shrink: 0; margin-top: 2px; }
.cit-otp-title { font-weight: 700; font-size: 15px; color: #1e293b; margin: 0 0 4px; }
.cit-otp-sub { font-size: 13px; color: #64748b; margin: 0; }
.cit-otp-row {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.cit-otp-input {
  letter-spacing: 0.4em;
  font-size: 22px;
  max-width: 160px;
  text-align: center;
  font-weight: 700;
}

/* ── BANNERS ── */
.cit-success-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f0fdf4;
  border: 1.5px solid #86efac;
  color: #16a34a;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 600;
}
.cit-check-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  background: #16a34a;
  color: #fff;
  border-radius: 50%;
  font-size: 12px;
  flex-shrink: 0;
}
.cit-error-banner {
  background: #fef2f2;
  border: 1.5px solid #fca5a5;
  color: #dc2626;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 14px;
  margin: 0 32px 20px;
}

/* ── UPLOAD ── */
.cit-dropzone {
  border: 2px dashed #cbd5e1;
  border-radius: 14px;
  padding: 32px 24px;
  text-align: center;
  color: #64748b;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  margin-bottom: 16px;
}
.cit-dropzone:hover, .cit-dropzone.drag-over { border-color: #00305d; background: #f0f9ff; }
.cit-dropzone-icon { font-size: 2rem; margin-bottom: 8px; }
.cit-dropzone p { margin: 0 0 12px; font-size: 14px; }
.cit-dropzone p:last-child { margin: 12px 0 0; font-size: 12px; }
.cit-upload-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: #f8fafc;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 6px;
  border: 1px solid #e2e8f0;
}

/* ── SLOTS ── */
.cit-slot-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 20px;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  margin-bottom: 10px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 500;
  transition: all 0.15s;
  background: #fff;
  color: #1e293b;
}
.cit-slot-btn:hover { border-color: #1a6fa8; background: #f0f9ff; transform: translateX(3px); }
.cit-slot-btn.selected { border-color: #00305d; background: #dbeafe; font-weight: 700; color: #00305d; }
.cit-slot-icon { font-size: 1.3em; }

/* ── TYC ── */
.cit-tyc-block .cit-check-card { background: #fffbeb; border-color: #fde68a; font-size: 13px; line-height: 1.7; }
.cit-tyc-block .cit-check-card:has(input:checked) { border-color: #f59e0b; background: #fef3c7; }

/* ── CONFIRM SUMMARY ── */
.cit-confirm-summary table { border-collapse: collapse; width: 100%; }
.cit-confirm-summary td { padding: 8px 0; font-size: 14px; vertical-align: top; }
.cit-confirm-summary td:first-child { color: #64748b; width: 130px; }
.cit-confirm-summary td:last-child { font-weight: 600; color: #1e293b; }

/* ── LOADING OVERLAY ── */
.cit-loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.cit-loading-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.cit-spinner {
  width: 44px;
  height: 44px;
  border: 4px solid #e2e8f0;
  border-top-color: #00305d;
  border-radius: 50%;
  animation: cit-spin 0.8s linear infinite;
}
.cit-loading-text {
  font-size: 14px;
  color: #64748b;
  margin: 0;
}
@keyframes cit-spin { to { transform: rotate(360deg); } }

/* ── RESPONSIVE ── */
@media (max-width: 640px) {
  .cit-wizard-container { border-radius: 0; margin: 0; box-shadow: none; }
  .cit-wizard-hero { padding: 28px 20px 22px; }
  .cit-wizard-hero-title { font-size: 1.3rem; }
  .cit-wizard-hero-chips { display: none; }
  .cit-progress-wrap { padding: 16px 20px 4px; }
  .cit-step { padding: 22px 20px 28px; }
  .cit-step-title { font-size: 1.15rem; }
  .cit-field-row { grid-template-columns: 1fr; gap: 0; }
  .cit-radio-row { flex-direction: column; }
  .cit-nav { justify-content: stretch; }
  .cit-nav .cit-btn { flex: 1; }
  .cit-otp-row { flex-direction: column; }
  .cit-otp-input { max-width: 100%; }
  .cit-country-dropdown { width: 100%; }
  .cit-btn { padding: 13px 16px; }
  .cit-error-banner { margin: 0 20px 16px; }
}

@media (prefers-color-scheme: dark) {
  /* keep white for medical context */
}

/* v3.1.0 patches */
.cit-btn-primary { color: #ffffff !important; }
.cit-btn-back {
  background: #00305d;
  color: #ffffff !important;
  border-color: #00305d;
}
.cit-btn-back:hover { background: #004d99; border-color: #004d99; color: #ffffff !important; }
.cit-optional-badge {
  display: inline-block;
  background: #fef9c3;
  color: #854d0e;
  border: 1px solid #fde047;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 16px;
}
.cit-motivacional { padding: 8px 0; }
/* Hide WP page title on solicitar-cita */
.page-id-4658 .entry-title,
.page-id-4658 h1.page-title,
.page-id-4658 .wp-block-post-title,
.page-id-4658 .page-header { display: none !important; }

/* Ocultar banner de página del tema (Meddox) en solicitar-cita */
.page-id-4658 #pxl-page-title-default,
.page-id-4658 #pxl-page-title-elementor {
  display: none !important;
}
/* También eliminar el padding que deja el tema cuando no hay header banner */
.page-id-4658 #pxl-main {
  padding-top: 0 !important;
}

/* ── v3.1.1 patches ─────────────────────────────────────────────── */

/* Botón upload: texto siempre blanco en botón azul */
.cit-upload-btn,
label.cit-upload-btn,
.cit-dropzone .cit-btn-outline {
  background: #00305d !important;
  color: #ffffff !important;
  border-color: #00305d !important;
}
.cit-upload-btn:hover { background: #0f5767 !important; border-color: #0f5767 !important; }

/* Bloque menor de edad */
.cit-menor-block { margin-top: 20px; }
#cit-menor-block {
  border-radius: 14px;
  border: 2px solid #0f5767;
  overflow: hidden;
  margin: 16px 0;
}
.cit-menor-alert {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: linear-gradient(135deg,#00305d,#0f5767);
  color: #fff;
  padding: 16px 20px;
}
.cit-menor-alert strong { display:block;font-size:15px;margin-bottom:4px; }
.cit-menor-alert p { margin:0;font-size:13px;opacity:.85; }
#cit-menor-block .cit-field-row,
#cit-menor-block .cit-field-group { padding: 0 20px; margin-top:16px; }
#cit-menor-block .cit-field-group:last-child { padding-bottom:16px; }
.cit-tyc-menor-box {
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  padding: 20px;
  font-size: 13px;
  color: #374151;
  line-height: 1.7;
}
.cit-tyc-menor-box h4 { color:#00305d;margin:0 0 12px;font-size:14px; }
.cit-tyc-menor-box ol { padding-left:18px;margin:8px 0 0; }
.cit-tyc-menor-box li { margin-bottom:8px; }
.cit-tyc-menor-label { align-items:flex-start; }

/* Reducir espacio blanco del tema en todas las páginas */
.page-id-4658 .pxl-content-area,
.page-id-4658 #pxl-content-area,
.page-id-4658 .elementor-section,
.page-id-4658 .e-con { padding-top: 0 !important; margin-top: 0 !important; }

/* ─── v3.2.0 ───────────────────────────────────────────────────────── */
.cit-input::placeholder { color: #94a3b8 !important; font-weight: 400 !important; font-style: italic; }
.cit-radio-card:hover, .cit-radio-card-sm:hover,
.cit-check-card:hover { border-color: #0f5767 !important; background: #f0f9ff !important; }
.cit-country-btn:hover { border-color: #0f5767 !important; }
.cit-btn-primary:hover { background: #0f5767 !important; border-color: #0f5767 !important; }
.cit-btn-outline:hover { border-color: #0f5767 !important; color: #0f5767 !important; }
.cit-slot-btn { color: #00305d !important; font-weight: 600 !important; }
.cit-slot-btn:hover { border-color: #0f5767 !important; }
.cit-slot-btn.selected { border-color: #0f5767 !important; background: #e0f2fe !important; color: #0f5767 !important; }

/* Override theme [class*="-btn"] white color rule */
body .cit-wizard-wrap .cit-slot-btn,
body .cit-wizard-wrap .cit-slot-btn *,
body .cit-wizard-wrap .cit-slot-btn span,
body .cit-wizard-wrap .cit-slot-btn .cit-slot-text { color: #00305d !important; }
body .cit-wizard-wrap .cit-slot-btn.selected,
body .cit-wizard-wrap .cit-slot-btn.selected * { color: #0f5767 !important; }

/* Fix: botón ver otras fechas — blindar contra overrides del tema */
body .cit-wizard-wrap #cit-slots-container button {
  color: #334155 !important;
  background: #f8fafc !important;
}
