/* ============================================
   CALIXPRESS - Componentes (Botones, Modales, Formularios)
   ============================================ */

/* ---- BOTONES ---- */
.btn-header {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
  padding: 0.9rem 2.2rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.2px;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    background 0.25s ease;
}

.btn-header:hover {
  transform: translateY(-2px) scale(1.02);
  background: linear-gradient(135deg, var(--primary-dark), var(--secondary));
  box-shadow: 0 16px 35px rgba(0, 0, 0, 0.45);
}

.btn-header:active {
  transform: translateY(0) scale(0.99);
}

.btn-header:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.btn-select {
  background: var(--primary);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  margin-top: 1rem;
  transition: all 0.3s ease;
  font-size: 1rem;
}

.btn-select:hover {
  transform: scale(1.05);
  background: var(--primary-dark);
  box-shadow: 0 10px 25px rgba(229, 57, 53, 0.35);
}

.btn-secondary {
  background: var(--secondary);
  color: white;
}

.btn-secondary:hover {
  background: var(--secondary-dark);
}

.btn-nav {
  flex: 1;
  padding: 0.875rem 1.5rem;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-prev {
  background: var(--dark);
  color: var(--light);
}

.btn-prev:hover {
  background: var(--gray);
}

.btn-next {
  background: var(--primary);
  color: white;
}

.btn-next:hover {
  transform: scale(1.02);
  background: var(--primary-dark);
  box-shadow: 0 10px 25px rgba(229, 57, 53, 0.35);
}

.whatsapp-btn {
  background: var(--secondary);
  color: white;
  border: none;
  padding: 1rem 2rem;
  border-radius: 15px;
  font-weight: 700;
  font-size: 1.1rem;
  cursor: pointer;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  transition: all 0.3s ease;
  text-decoration: none;
}

.whatsapp-btn:hover {
  transform: scale(1.05);
  background: var(--secondary-dark);
  box-shadow: 0 15px 35px rgba(67, 160, 71, 0.35);
}

/* Botón dentro de las cards: mayor contraste sobre imagen */
.service-card .btn-select {
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
}

/* ---- MODAL ---- */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
  z-index: 1000;
  overflow-y: auto;
  padding: 1rem;
  animation: fadeIn 0.3s ease;
}

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

.modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: var(--dark-light);
  border-radius: 20px;
  padding: 2rem;
  max-width: 600px;
  width: 100%;
  position: relative;
  animation: slideUp 0.3s ease;
  max-height: 90vh;
  overflow-y: auto;
}

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

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--dark);
}

.modal-header h2 {
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.close-btn {
  background: var(--dark);
  border: none;
  color: var(--light);
  width: 35px;
  height: 35px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.close-btn:hover {
  background: var(--primary);
  transform: rotate(90deg);
}

/* ---- PROGRESS STEPS ---- */
.progress-steps {
  display: flex;
  justify-content: space-between;
  margin-bottom: 2rem;
  position: relative;
}

.progress-steps::before {
  content: "";
  position: absolute;
  top: 20px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--dark);
  z-index: 0;
}

.progress-line {
  position: absolute;
  top: 20px;
  left: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.3s ease;
  z-index: 1;
  width: 0%;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  position: relative;
  z-index: 2;
  flex: 1;
}

.step-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--dark);
  border: 2px solid var(--gray);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  transition: all 0.3s ease;
  color: var(--gray);
}

.step.active .step-circle {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  transform: scale(1.1);
}

.step.completed .step-circle {
  background: var(--success);
  border-color: var(--success);
  color: white;
}

.step-label {
  font-size: 0.75rem;
  color: var(--gray);
  text-align: center;
}

.step.active .step-label {
  color: var(--primary);
  font-weight: 600;
}

/* ---- FORM ---- */
.form-step {
  display: none;
}

.form-step.active {
  display: block;
  animation: fadeInUp 0.3s ease;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--light);
  font-size: 0.9rem;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 0.875rem;
  background: var(--dark);
  border: 2px solid transparent;
  border-radius: 10px;
  color: var(--light);
  font-size: 1rem;
  transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(229, 57, 53, 0.12);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.checkbox-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  background: var(--dark);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.checkbox-container:hover {
  background: rgba(229, 57, 53, 0.12);
}

.checkbox-container input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
}

/* ---- AUTOCOMPLETE ---- */
.autocomplete-container {
  position: relative;
}

.suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--dark);
  border: 2px solid var(--primary);
  border-radius: 10px;
  margin-top: 0.5rem;
  max-height: 200px;
  overflow-y: auto;
  z-index: 10;
  display: none;
}

.suggestions.active {
  display: block;
}

.suggestion-item {
  padding: 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border-bottom: 1px solid var(--dark-light);
  color: var(--light);
}

.suggestion-item:hover,
.suggestion-item.selected {
  background: var(--primary);
  color: white;
}

.suggestion-item:last-child {
  border-bottom: none;
}

/* ---- FORM NAVIGATION ---- */
.form-navigation {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

/* ---- ACCIONES FLOTANTES ---- */
.floating-actions {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  z-index: 999;
}

.floating-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  text-decoration: none;
  color: white;
  transition: all 0.3s ease;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

.floating-btn:hover {
  transform: scale(1.1);
  animation: none;
}

.whatsapp-float {
  background: var(--secondary);
}

.call-float {
  background: var(--primary);
  animation-delay: 0.3s;
}
