* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

@font-face {
  font-family: "Avenir Next LT Pro";
  src: url("avenir-next-lt-pro.otf") format("opentype"),
    url("avenir-next-lt-pro.woff") format("woff");
  font-weight: normal;
  font-style: normal;
}

html,
body {
  font-family: "Avenir Next LT Pro", sans-serif;
  color: #333;
  line-height: 1.5;
  padding: 0;
  margin: 0;
}

.form-container {
  background: white;
  margin: 0 auto;
  min-height: 100vh;
  max-width: 800px;
}

/* Barra de progeso */
.progress-header {
  padding: 30px 60px 15px;
}

.progress-steps {
  display: flex;
  justify-content: space-between;
  position: relative;
  margin-bottom: 10px;
}

.progress-steps::before {
  content: "";
  position: absolute;
  top: 12px;
  left: 0;
  right: 0;
  height: 2px;
  background: #e9ecef;
  z-index: 1;
}

.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 2;
  flex: 1;
  text-align: center;
}

.step-indicator {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: white;
  border: 2px solid #e9ecef;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 8px;
  transition: all 0.3s ease;
}

.step-label {
  font-size: 14px;
  color: #6c757d;
  font-weight: 500;
}

.progress-step.active .step-indicator {
  background: #00619b;
  border-color: #00619b;
  color: white;
}

.progress-step.active .step-label {
  color: #00619b;
}

.progress-step.completed .step-indicator {
  background: #198754;
  border-color: #198754;
  color: white;
}

.progress-step.completed .step-label {
  color: #198754;
}

.progress-line {
  position: absolute;
  top: 12px;
  left: 0;
  height: 2px;
  background: #00619b;
  transition: width 0.3s ease;
  z-index: 1;
}

/* Formulario */
.form-content {
  padding: 15px 30px 0px;
  min-height: calc(100vh - 120px);
}

.form-step {
  display: none;
  background: white;
  border-radius: 8px;
  padding: 30px;
}

.form-step.active {
  display: block;
}

.step-title {
  font-size: 18px;
  font-weight: 600;
  color: #495057;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e9ecef;
}

.step-description {
  color: #6c757d;
  margin-bottom: 25px;
  line-height: 1.6;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #495057;
  font-size: 14px;
}

.required {
  color: #dc3545;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #ced4da;
  border-radius: 0;
  font-size: 14px;
  background: white;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
  border-color: #00619b;
  outline: 0;
}

.form-select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #ced4da;
  border-radius: 0;
  font-size: 14px;
  background: white
    url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m1 6 7 7 7-7'/%3e%3c/svg%3e")
    no-repeat right 0.75rem center/16px 12px;
  appearance: none;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-select:focus {
  border-color: #00619b;
  outline: 0;
}

.form-check {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  margin-bottom: 15px;
}

.form-check-label {
  font-size: 13px;
  color: #6c757d;
  margin-bottom: 1rem;
  line-height: 1.5;
}

.privacy-link {
  color: #00619b;
  text-decoration: none;
}

.privacy-link:hover {
  text-decoration: underline;
}

.terms {
  display: flex;
  align-items: center;
  gap: 10px;
}

.form-check-input {
  width: 18px;
  height: 18px;
  accent-color: #00619b;
}

.form-check-input:focus-visible {
  outline: #00619b auto 1px;
}

.form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 30px;
  padding-top: 20px;
}

.btn {
  padding: 10px 20px;
  border-radius: 4px;
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
  border: 1px solid transparent;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

.btn-primary {
  background-color: #007ac2;
  border-radius: 0;
  color: white;
}

.btn-primary:hover {
  background-color: #00619b;
}

.btn-outline-primary {
  border-color: #007ac2;
  background-color: white;
  color: #007ac2;
  border-width: 1px;
  border-style: solid;
  border-radius: 0;
  box-shadow: transparent 0 0 0 1px inset;
}

.btn-outline-primary:hover {
  border-color: #00619b;
  color: #00619b;
  box-shadow: inset 0 0 0 1px #00619b;
}

.btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.custom-tooltip-container i {
  cursor: pointer;
  margin-left: 0.5em;
  
}

.custom-tooltip-container {
  position: absolute;
  display: inline-block;
}

.custom-tooltip-text {
  visibility: hidden;
  opacity: 0;
  width: 220px;
  background-color: #333;
  color: #fff;
  text-align: left;
  border-radius: 6px;
  padding: 8px;
  position: absolute;
  z-index: 10;
  bottom: 125%; 
  left: 50%;
  transform: translateX(-50%);
  transition: opacity 0.3s ease;
  font-size: 0.85rem;
  line-height: 1.3;
  pointer-events: none;
  max-width: 50vw; 
  white-space: normal; 
  overflow-wrap: break-word;
}

.custom-tooltip-container:hover .custom-tooltip-text {
  visibility: visible;
  opacity: 1;
}

.error {
  border-color: #dc3545 !important;
}

.error-message {
  color: #dc3545;
  font-size: 12px;
  margin-top: 5px;
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-5px);
  }
  75% {
    transform: translateX(5px);
  }
}

.shake {
  animation: shake 0.3s;
}

/* Alerta */
.alert {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 16px 20px;
  border-radius: 6px;
  color: white;
  font-weight: 500;
  z-index: 1000;
  transform: translateX(400px);
  transition: transform 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  max-width: 350px;
  display: flex;
  align-items: center;
}

.alert.show {
  transform: translateX(0);
}

.alert-success {
  background: linear-gradient(135deg, #198754, #157347);
}

.alert-icon {
  margin-right: 12px;
  font-size: 18px;
}

.alert-text {
  flex: 1;
}

.alert-close {
  background: none;
  border: none;
  color: white;
  font-size: 18px;
  cursor: pointer;
  padding: 0;
  margin-left: 12px;
  opacity: 0.8;
}

.alert-close:hover {
  opacity: 1;
}

@media (max-width: 768px) {
  .form-step {
    padding: 20px;
  }

  .step-label {
    font-size: 14px;
  }

  .form-actions {
    gap: 1rem;
  }

  .alert {
    left: 20px;
    right: 20px;
    max-width: none;
  }
}

/* Estilos para el Loader/Spinner */
.loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loader-spinner {
    border: 8px solid #f3f3f3;
    border-top: 8px solid #007ac2;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}