/* ====== GMV Brand Theme (primary #e65742) + estilos del formulario visa USA ====== */
:root {
  /* Base */
  --bg: #f6f7fb;
  --card: #ffffffcc;
  --text: #1a1f36;
  --muted: #6c757d;

  /* Marca GMV */
  --primary: #e65742 !important;
  --primary-600: #d64f3c !important;
  --primary-700: #c74734 !important;
  --primary-soft: rgba(230, 87, 66, 0.12) !important;
  --primary-ring: rgba(230, 87, 66, 0.18) !important;

  --radius: 16px;
  --ring: 0 0 0 4px var(--primary-ring);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0f14;
    --card: #0f1622cc;
    --text: #e6eefc;
    --muted: #93a1b4;
    --primary-ring: rgba(230, 87, 66, 0.28);
    --ring: 0 0 0 4px var(--primary-ring);
    --bs-primary: #000;
  }
}

/* ====== Estilos Base ====== */
html,
body {
  background: var(--bg);
  color: var(--text);
  font-family: "Quicksand", system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
}

/* ====== Card vidrio suave ====== */
.card {
  border: 0;
  border-radius: var(--radius);
  backdrop-filter: saturate(120%) blur(6px);
  background: var(--card);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease;
}

/* ====== Hero Header ====== */
.hero-header h1 {
  font-weight: 800;
  font-size: 1.75rem;
  letter-spacing: 0.2px;
  color: var(--text);
  margin: 0;
}

.hero-header p {
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ====== TÃƒÆ’Ã‚Â­tulos de secciÃƒÆ’Ã‚Â³n con jerarquÃƒÆ’Ã‚Â­a ====== */
.section-title {
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: 0.2px;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1rem;
  color: var(--text);
}

.section-title i {
  color: var(--primary);
  font-size: 1.5rem;
}

/* ====== Labels y form elements ====== */
.form-label {
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 0.35rem;
  letter-spacing: 0.2px;
  color: var(--text);
}

.form-control,
.form-select {
  border-radius: 12px;
  border: 1px solid #e7e9ef;
  transition: border-color 0.2s ease, box-shadow 0.2s ease,
    background-color 0.2s ease;
  background-clip: padding-box;
  font-family: "Quicksand", sans-serif;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--primary) !important;
  box-shadow: var(--ring);
  outline: 0;
}

/* ====== Radios y checkboxes ====== */
.form-check-input {
  accent-color: var(--primary);
}

.form-check-input:focus {
  box-shadow: var(--ring);
  border-color: var(--primary);
}

.form-check-input[type="radio"]:checked {
  background-color: var(--primary);
  border-color: var(--primary);
}

.form-check-label {
  cursor: pointer;
  user-select: none;
}

/* ====== Botones ====== */
.btn.btn-primary {
  background-color: var(--primary);
  border-color: var(--primary);
  border-radius: 999px;
  padding: 0.9rem 1.2rem;
  font-weight: 600;
  box-shadow: 0 10px 20px rgba(230, 87, 66, 0.18);
  transition: transform 0.08s ease, background-color 0.15s ease,
    border-color 0.15s ease;
}

.btn.btn-primary:hover {
  background-color: var(--primary-600);
  border-color: var(--primary-600);
  transform: translateY(-1px);
}

.btn.btn-primary:active {
  background-color: var(--primary-700);
  border-color: var(--primary-700);
  transform: translateY(0);
}

.btn.btn-secondary {
  background-color: var(--muted);
  border-color: var(--muted);
  color: #fff;
  border-radius: 999px;
  padding: 0.9rem 1.2rem;
  font-weight: 600;
  box-shadow: 0 10px 20px rgba(108, 117, 125, 0.18);
  transition: transform 0.08s ease, background-color 0.15s ease,
    border-color 0.15s ease;
}

.btn.btn-secondary:hover {
  background-color: #5a6268;
  border-color: #545b62;
  color: #fff;
  transform: translateY(-1px);
}

.btn.btn-secondary:active {
  background-color: #545b62;
  border-color: #4e555b;
  transform: translateY(0);
}

.btn.btn-success {
  border-radius: 999px;
  padding: 0.9rem 1.2rem;
  font-weight: 600;
  box-shadow: 0 10px 20px rgba(40, 167, 69, 0.18);
  transition: transform 0.08s ease;
}

.btn.btn-success:hover {
  transform: translateY(-1px);
}

.btn.btn-outline-secondary {
  border-radius: 999px;
  padding: 0.9rem 1.2rem;
  font-weight: 600;
  transition: all 0.2s ease;
}

.btn.btn-outline-danger {
  border-radius: 999px;
  transition: all 0.2s ease;
}

/* ====== Progress bar ====== */
.progress {
  height: 12px;
  border-radius: 999px;
  background: #e9eef6;
  overflow: hidden;
}

.progress-bar {
  border-radius: 999px;
  transition: width 0.3s ease;
  background-color: var(--primary) !important;
}

/* ====== Wizard Steps ====== */
.wizard-step {
  display: none !important;
}

.wizard-step.active {
  display: block !important;
  animation: fadeInUp 0.4s ease;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ====== Wizard Progress ====== */
.wizard-progress {
  text-align: center;
}

.wizard-progress strong {
  color: var(--primary);
  font-weight: 700;
}

/* ====== Sidebar sticky ====== */
.sidebar {
  position: sticky;
  top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* ====== Animaciones ====== */
@media (prefers-reduced-motion: no-preference) {
  .fade-in {
    animation: fade 0.35s ease both;
  }

  @keyframes fade {
    from {
      opacity: 0;
      transform: translateY(6px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}

/* ====== SelecciÃƒÆ’Ã‚Â³n de texto ====== */
::selection {
  background: var(--primary-soft);
  color: var(--text);
}

/* ====== Placeholders ====== */
::placeholder {
  opacity: 0.7;
  color: var(--muted);
}

/* ====== Text utilities ====== */
.text-muted {
  color: var(--muted) !important;
}

.text-primary {
  color: var(--primary) !important;
}

/* ====== Alerts ====== */
.alert {
  border-radius: 12px;
  border: 0;
  font-weight: 500;
}

.alert-info {
  background-color: rgba(13, 202, 240, 0.1);
  color: #0dcaf0;
  border-left: 4px solid #0dcaf0;
}

.alert-warning {
  background-color: rgba(255, 193, 7, 0.1);
  color: #685100;
  border-left: 4px solid #685100;
}

.alert-danger {
  background-color: rgba(220, 53, 69, 0.1);
  color: #dc3545;
  border-left: 4px solid #dc3545;
}

.alert-success {
  background-color: rgba(25, 135, 84, 0.1);
  color: #198754;
  border-left: 4px solid #198754;
}

/* Alert posicionado fijo para notificaciones */
.alert.position-fixed {
  top: 20px;
  right: 20px;
  min-width: 300px;
  max-width: 400px;
  z-index: 9999;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(100px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ====== Modales ====== */
.modal-content {
  border-radius: var(--radius);
  border: 0;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
}

.modal-header {
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  padding: 1.25rem;
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  padding: 1rem 1.25rem;
  gap: 0.75rem;
}

.modal-footer .btn {
  margin: 0;
  min-width: 100px;
}

.modal-title {
  font-weight: 700;
  font-size: 1.1rem;
}

/* ====== Form validation ====== */
.was-validated .form-control:invalid,
.was-validated .form-select:invalid,
.form-control.is-invalid,
.form-select.is-invalid {
  border-color: #dc3545;
  background-image: none;
}

.was-validated .form-control:valid,
.was-validated .form-select:valid,
.form-control.is-valid,
.form-select.is-valid {
  border-color: #198754;
  background-image: none;
}

.form-check-input.is-invalid {
  border-color: #dc3545;
}

.form-check-input.is-invalid:checked {
  background-color: #dc3545;
  border-color: #dc3545;
}

.invalid-feedback,
.valid-feedback {
  font-size: 0.875rem;
  margin-top: 0.35rem;
  font-weight: 500;
}

.invalid-feedback {
  color: #dc3545;
  display: none !important;
}

.invalid-feedback.d-block {
  display: block !important;
}

/* AnimaciÃƒÆ’Ã‚Â³n para campos con error */
@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  10%,
  30%,
  50%,
  70%,
  90% {
    transform: translateX(-5px);
  }
  20%,
  40%,
  60%,
  80% {
    transform: translateX(5px);
  }
}

.form-control.is-invalid,
.form-select.is-invalid {
  animation: shake 0.5s;
}

/* ====== Responsive adjustments ====== */
@media (max-width: 991px) {
  .sidebar {
    position: static;
  }

  .hero-header h1 {
    font-size: 1.5rem;
  }

  .section-title {
    font-size: 1.2rem;
  }
}

@media (max-width: 767px) {
  .btn {
    font-size: 0.9rem;
    padding: 0.75rem 1rem;
  }

  .wizard-progress {
    font-size: 0.9rem;
  }
}

/* ====== Smooth scrolling ====== */
html {
  scroll-behavior: smooth;
}

/* ====== Badge soft ====== */
.badge-soft {
  background: var(--primary-soft);
  color: var(--primary);
  border-radius: 999px;
  padding: 0.35rem 0.6rem;
  font-weight: 600;
}

/* ====== Small text ====== */
.small {
  font-size: 0.875rem;
}

/* ====== Dividers ====== */
hr {
  margin: 1.5rem 0;
  opacity: 0.1;
}

/* ====== List styles ====== */
.list-unstyled li {
  padding: 0.25rem 0;
}

/* ====== Icon sizes ====== */
.bi {
  vertical-align: middle;
}

/* ====== Textarea ====== */
/* ====== ValidaciÃƒÆ’Ã‚Â³n Visual de Campos ====== */

/* Campo con error */
.is-invalid {
  border-color: #dc3545 !important;
  box-shadow: 0 0 0 0.15rem rgba(220, 53, 69, 0.15) !important;
  background-color: rgba(220, 53, 69, 0.02) !important;
}

.is-invalid:focus {
  border-color: #dc3545 !important;
  box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25) !important;
}

/* Radio buttons con error */
.form-check-input.is-invalid {
  border-color: #dc3545 !important;
  box-shadow: 0 0 0 0.15rem rgba(220, 53, 69, 0.15);
}

.form-check-input.is-invalid:checked {
  background-color: #dc3545 !important;
  border-color: #dc3545 !important;
}

/* Mensaje de error */
.invalid-feedback {
  display: block !important;
  color: #dc3545;
  font-size: 0.8125rem;
  font-weight: 500;
  margin-top: 0.35rem;
  padding-left: 0.25rem;
  animation: fadeInError 0.3s ease;
}

@keyframes fadeInError {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Label del campo con error */
.is-invalid ~ label,
label:has(+ .is-invalid) {
  color: #dc3545;
  font-weight: 600;
}

/* Select con error */
select.is-invalid {
  border-color: #dc3545 !important;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23dc3545' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
}

/* Textarea con error */
textarea.is-invalid {
  border-color: #dc3545 !important;
}

/* ====== Auto-save toast discreto ====== */
.auto-save-toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--card);
  backdrop-filter: saturate(120%) blur(12px);
  padding: 0.65rem 1rem;
  border-radius: 999px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  z-index: 9999;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
  pointer-events: none;
}

.auto-save-toast.show {
  opacity: 1;
  transform: translateY(0);
}

.auto-save-toast i {
  color: #28a745;
  font-size: 1rem;
}

/* ====== Loading spinner ====== */
.spinner-border-sm {
  width: 1rem;
  height: 1rem;
  border-width: 0.2em;
}

/* ====== Disabled state ====== */
.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ====== Focus visible ====== */
*:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* ====== Card hover effects (subtle) ====== */
.card:hover {
  transform: translateY(-2px);
}

/* ====== Step indicator dots (opcional para futuro) ====== */
.step-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin: 1rem 0;
}

.step-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #e7e9ef;
  transition: all 0.3s ease;
}

.step-dot.active {
  background: var(--primary);
  width: 30px;
  border-radius: 5px;
}

/* ====== Print styles ====== */
@media print {
  .sidebar,
  .btn,
  .wizard-progress {
    display: none !important;
  }

  .wizard-step {
    display: block !important;
    page-break-inside: avoid;
  }

  .card {
    box-shadow: none;
    border: 1px solid #ddd;
  }
}

/* ====== Dark mode adjustments para modales ====== */
@media (prefers-color-scheme: dark) {
  .modal-content {
    background: var(--card);
    color: var(--text);
  }

  .modal-header,
  .modal-footer {
    border-color: rgba(255, 255, 255, 0.1);
  }

  .btn-close {
    filter: invert(1);
  }

  .btn.btn-secondary {
    background-color: #5a6268;
    border-color: #5a6268;
  }

  .btn.btn-secondary:hover {
    background-color: #6c757d;
    border-color: #6c757d;
  }
}

/* ====== Accesibilidad ====== */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ====== Tooltips (si se usan Bootstrap tooltips) ====== */
.tooltip-inner {
  background-color: var(--text);
  color: var(--bg);
  border-radius: 8px;
  font-family: "Quicksand", sans-serif;
}

/* Estilo de error para el bloque del reCAPTCHA */
#recaptchaContainer.recaptcha-invalid .g-recaptcha {
  outline: 2px solid #e65742;
  outline-offset: 4px;
}

/* Mensaje debajo del reCAPTCHA */
#recaptcha-error {
  display: none;
  color: #e65742;
  font-weight: 600;
  margin-top: 0.5rem;
  font-size: 0.9rem;
}

/* ====== Info Card Compact ====== */
.info-card-compact .info-list-compact {
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--muted);
}

.info-card-compact .info-list-compact li {
  margin-bottom: 0.5rem;
  display: flex;
  align-items: flex-start;
}

.info-card-compact .info-list-compact li:last-child {
  margin-bottom: 0;
}

.info-card-compact .info-list-compact i {
  flex-shrink: 0;
  margin-top: 0.1rem;
  font-size: 0.875rem;
}

/* ====== Timeline Moderno y Compacto ====== */
.timeline-container {
  max-height: 380px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 0.25rem;
}

.timeline-step {
  display: flex;
  align-items: center;
  padding: 0.4rem 0.5rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
  margin-bottom: 0.25rem;
}

.timeline-step:hover:not(.step-locked) {
  background: rgba(230, 87, 66, 0.04);
  padding-left: 0.65rem;
}

/* LÃƒÆ’Ã‚Â­nea vertical conectora moderna */
.timeline-step:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 24px;
  width: 2px;
  height: calc(100% - 4px);
  background: linear-gradient(
    to bottom,
    rgba(230, 87, 66, 0.15),
    rgba(230, 87, 66, 0.05)
  );
  z-index: 0;
  border-radius: 2px;
}

.timeline-indicator {
  width: 22px;
  height: 22px;
  min-width: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 0.6rem;
  position: relative;
  z-index: 1;
  transition: all 0.2s ease;
  font-weight: 700;
  font-size: 0.65rem;
  background: #f8f9fa;
  border: 2px solid #e9ecef;
  color: #adb5bd;
}

.timeline-content {
  flex: 1;
}

.timeline-content .step-title {
  font-size: 0.75rem;
  font-weight: 500;
  color: #6c757d;
  line-height: 1.3;
  transition: color 0.2s ease;
}

/* ========== Estados Modernos ========== */

/* Paso Pendiente */
.timeline-step.step-pending .timeline-indicator {
  background: #f8f9fa;
  border-color: #e9ecef;
  color: #adb5bd;
}

.timeline-step.step-pending .step-title {
  color: #9ca3af;
}

/* Paso Actual - Coral vibrante */
.timeline-step.step-current {
  background: linear-gradient(to right, rgba(230, 87, 66, 0.05), transparent);
}

.timeline-step.step-current .timeline-indicator {
  background: linear-gradient(135deg, #e65742, #d64f3c);
  border-color: #e65742;
  color: white;
  box-shadow: 0 2px 8px rgba(230, 87, 66, 0.25);
  font-weight: 700;
  transform: scale(1.05);
}

.timeline-step.step-current .step-title {
  color: var(--primary);
  font-weight: 600;
}

.timeline-step.step-current::before {
  background: linear-gradient(
    to bottom,
    rgba(230, 87, 66, 0.3),
    rgba(230, 87, 66, 0.1)
  );
}

/* Paso Completado - Check minimalista */
.timeline-step.step-completed .timeline-indicator {
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
  border-color: #d1d5db;
  color: var(--primary);
}

.timeline-step.step-completed .timeline-indicator .step-number {
  display: none !important;
}

.timeline-step.step-completed .timeline-indicator::after {
  content: "✓";
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
}

.timeline-step.step-completed .step-title {
  color: #6b7280;
}

.timeline-step.step-completed::before {
  background: linear-gradient(
    to bottom,
    rgba(230, 87, 66, 0.12),
    rgba(230, 87, 66, 0.04)
  );
}

/* Paso Bloqueado */
.timeline-step.step-locked {
  opacity: 0.35;
  cursor: not-allowed;
}

.timeline-step.step-locked:hover {
  background: transparent;
  padding-left: 0.5rem;
}

.timeline-step.step-locked .timeline-indicator {
  border-style: dashed;
}

/* Hover mejorado */
.timeline-step:not(.step-locked):not(.step-current):hover .step-title {
  color: var(--primary);
}

.timeline-step:not(.step-locked):hover .timeline-indicator {
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  transform: translateX(1px);
}

/* Responsive */
@media (max-width: 991px) {
  .timeline-container {
    max-height: 280px;
  }

  .timeline-step {
    padding: 0.35rem 0.45rem;
  }

  .timeline-indicator {
    width: 20px;
    height: 20px;
    min-width: 20px;
    font-size: 0.6rem;
  }

  .timeline-step:not(:last-child)::before {
    left: 10px;
  }

  .timeline-content .step-title {
    font-size: 0.7rem;
  }
}

/* Modo oscuro mejorado */
@media (prefers-color-scheme: dark) {
  .timeline-indicator {
    background: #1e293b;
    border-color: #334155;
    color: #64748b;
  }

  .timeline-step.step-pending .step-title {
    color: #94a3b8;
  }

  .timeline-step.step-completed .timeline-indicator {
    background: linear-gradient(135deg, #1e293b, #334155);
    border-color: #475569;
  }

  .timeline-step:hover:not(.step-locked) {
    background: rgba(230, 87, 66, 0.08);
  }

  .timeline-step:not(:last-child)::before {
    background: linear-gradient(
      to bottom,
      rgba(230, 87, 66, 0.2),
      rgba(230, 87, 66, 0.05)
    );
  }

  .timeline-step.step-current {
    background: linear-gradient(to right, rgba(230, 87, 66, 0.1), transparent);
  }
}

/* ====== PASO 1: Apellido y Nombres en Negrita ====== */
.input-name-bold {
  font-weight: 700;
  color: var(--text);
}

.input-name-bold::placeholder {
  font-weight: 400;
  opacity: 0.6;
}

/* Small text hints for inputs */
small.text-muted {
  font-size: 0.8rem;
  display: block !important;
  margin-top: 0.25rem;
}
