/* WhatsApp Pre-Chat Modal — Europ Conducción */

#wa-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 22, 40, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  transition: opacity 200ms ease;
}

#wa-modal-backdrop.wa-visible {
  opacity: 1;
}

#wa-modal-panel {
  background: #FDFEFF;
  border-radius: 24px;
  box-shadow: 0 30px 80px -20px rgba(10, 22, 40, 0.35), 0 0 0 1px rgba(10, 22, 40, 0.06);
  width: 100%;
  max-width: 480px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  padding: 32px;
  position: relative;
  transform: scale(0.96) translateY(8px);
  opacity: 0;
  transition: transform 280ms cubic-bezier(.16, 1, .3, 1), opacity 280ms cubic-bezier(.16, 1, .3, 1);
}

#wa-modal-backdrop.wa-visible #wa-modal-panel {
  transform: scale(1) translateY(0);
  opacity: 1;
}

#wa-modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: #F1F3F7;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #4B5563;
  transition: background 150ms ease, color 150ms ease;
  flex-shrink: 0;
  padding: 0;
}

#wa-modal-close:hover {
  background: #E5E7EB;
  color: #0E1924;
}

.wa-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(37, 211, 102, 0.12);
  color: #128C7E;
  border-radius: 100px;
  padding: 5px 12px 5px 8px;
  font-family: 'Manrope', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  margin-bottom: 16px;
}

.wa-badge svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.wa-title {
  font-family: 'Fraunces', Georgia, serif;
  font-style: italic;
  font-weight: 600;
  font-size: 26px;
  line-height: 1.2;
  color: #0E1924;
  margin: 0 0 8px 0;
  padding-right: 44px;
}

.wa-subtitle {
  font-family: 'Manrope', sans-serif;
  font-size: 14px;
  color: #4B5563;
  line-height: 1.65;
  margin: 0 0 28px 0;
}

.wa-divider {
  height: 1px;
  background: #F1F3F7;
  margin: 0 0 28px 0;
  border: none;
}

#wa-modal-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.wa-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.wa-label {
  font-family: 'Manrope', sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: #0E1924;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.wa-input {
  height: 52px;
  border: 1.5px solid #E5E7EB;
  border-radius: 12px;
  padding: 0 16px;
  font-family: 'Manrope', sans-serif;
  font-size: 15px;
  color: #0E1924;
  background: #FDFEFF;
  outline: none;
  transition: border-color 200ms ease, box-shadow 200ms ease;
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  box-sizing: border-box;
}

.wa-input::placeholder {
  color: #9CA3AF;
}

.wa-input:focus {
  border-color: #2563EB;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.wa-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.wa-chip {
  position: relative;
}

.wa-chip input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.wa-chip label {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 18px;
  border-radius: 12px;
  border: 1.5px solid #E5E7EB;
  background: #FDFEFF;
  font-family: 'Manrope', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #4B5563;
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease, color 180ms ease, transform 120ms cubic-bezier(.4, 0, .2, 1), box-shadow 180ms ease;
  user-select: none;
  white-space: nowrap;
}

.wa-chip label:hover {
  border-color: #2563EB;
  color: #2563EB;
}

.wa-chip input[type="radio"]:checked + label {
  background: #0A1628;
  border-color: #0A1628;
  color: #FDFEFF;
  transform: scale(1.02);
  box-shadow: 0 4px 14px rgba(10, 22, 40, 0.18);
}

.wa-chip input[type="radio"]:focus-visible + label {
  outline: 2px solid #2563EB;
  outline-offset: 2px;
}

.wa-error {
  font-family: 'Manrope', sans-serif;
  font-size: 12px;
  color: #DC2626;
  display: none;
  margin-top: -2px;
}

.wa-field.wa-has-error .wa-input {
  border-color: #DC2626;
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.1);
}

.wa-field.wa-has-error .wa-error {
  display: block;
}

.wa-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 56px;
  border-radius: 14px;
  border: none;
  background: #25D366;
  color: #fff;
  font-family: 'Manrope', sans-serif;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease;
  margin-top: 4px;
  letter-spacing: 0.01em;
}

.wa-submit:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 10px 32px rgba(37, 211, 102, 0.4);
}

.wa-submit:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: none;
}

.wa-submit:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.wa-submit svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* Mobile — bottom sheet */
@media (max-width: 520px) {
  #wa-modal-backdrop {
    align-items: flex-end;
    padding: 0;
  }

  #wa-modal-panel {
    border-radius: 24px 24px 0 0;
    max-height: 92vh;
    padding: 24px 20px calc(24px + env(safe-area-inset-bottom));
    transform: translateY(24px);
  }

  #wa-modal-backdrop.wa-visible #wa-modal-panel {
    transform: translateY(0);
  }

  .wa-title {
    font-size: 22px;
  }

  .wa-chips {
    gap: 6px;
  }

  .wa-chip label {
    height: 40px;
    padding: 0 14px;
    font-size: 13px;
    border-radius: 10px;
  }

  #wa-modal-form {
    gap: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #wa-modal-backdrop,
  #wa-modal-panel,
  .wa-chip label,
  .wa-input,
  .wa-submit {
    transition: none !important;
  }
}
