/* Estilos personalizados y utilidades de micro-interacción */

@keyframes pulse-subtle {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.85;
    transform: scale(1.01);
  }
}

.animate-pulse-subtle {
  animation: pulse-subtle 2s infinite ease-in-out;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.35);
  border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, 0.6);
}

/* Transiciones suaves en inputs y botones */
input,
select,
button,
a {
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Indicador discreto de carga inicial */
.page-loader {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 9999;
  display: inline-flex;
  min-width: min(18rem, calc(100vw - 2rem));
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
  padding: 1.75rem 2rem;
  border: 2px solid rgba(255, 132, 0, 0.35);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.97);
  box-shadow:
    0 20px 45px rgba(15, 23, 42, 0.3),
    0 0 0 8px rgba(255, 132, 0, 0.1);
  color: #0f172a;
  font-size: 1rem;
  font-weight: 700;
  transform: translate(-50%, -50%);
  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
}

.page-loader.is-hidden {
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, calc(-50% - 0.5rem));
}

.page-loader.hidden {
  display: none;
}

.page-loader-spinner {
  width: 3rem;
  height: 3rem;
  border: 4px solid #ffedd5;
  border-top-color: #ff8400;
  border-right-color: #6366f1;
  border-radius: 50%;
  animation: page-loader-spin 0.8s linear infinite;
}

@keyframes page-loader-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {

  .page-loader,
  .page-loader-spinner {
    animation: none;
    transition: none;
  }
}

/* Colores esenciales disponibles aunque Tailwind CDN no cargue */
.app-brand-icon {
  background: linear-gradient(135deg, #ff8400, #ffb347);
  color: #ffffff;
  box-shadow: 0 4px 12px #ffac54;
}

#submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border: 0;
  border-radius: 0.25rem;
  background-color: #ff8400;
  color: #ffffff;
  cursor: pointer;
  box-shadow: 0 4px 10px #ffac54;
}

#submit-btn:hover,
.app-brand-icon:hover {
  background-color: #a85701;
}

/* Items de sugerencias de calles */
.street-option.active {
  background-color: #f5f3ff;
  color: #ff8400 !important;
}

/* Focus ring elegante */
.input-focus-ring:focus {
  outline: none;
  border-color: #ff8400 !important;
  box-shadow: 0 0 0 3px rgba(255, 132, 0, 0.15);
}