/* ==============================================================
   MISC.CSS — TuEstilo
   Toast, PWA banner, utilitarios residuales
   Extraído de styles.css (Fase 2 — Refactorización CSS)
   ============================================================== */

.toast {
  padding: 0.75rem 1.25rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  animation: toastSlideIn 0.3s ease-out;
  max-width: 320px;
}

.toast-success {
  background-color: var(--color-success-light);
  color: white;
  border: 1px solid var(--color-success);
}

.toast-error {
  background-color: #ef4444;
  color: white;
  border: 1px solid var(--color-danger);
}

.toast-exit {
  animation: toastSlideOut 0.3s ease-in forwards;
}

/* --- STORE MODAL FORM (2 columnas en desktop) --- */
#storeForm.store-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}

#storeForm.store-form-grid .store-form-horarios {
  grid-column: 1 / -1;
}

@media (max-width: 768px) {
  #storeForm.store-form-grid {
    grid-template-columns: 1fr;
  }
}

/* --- CATALOG FILTERS (responsive) --- */
.catalog-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

@media (max-width: 768px) {
  .catalog-filters {
    flex-direction: column;
    align-items: stretch;
  }

  .catalog-filters-selects {
    display: flex;
    gap: 0.5rem;
  }

  .catalog-filters-selects .catalog-filter-select {
    flex: 1 1 calc(50% - 0.25rem);
    min-width: 0;
  }
}

@keyframes toastSlideIn {
  from {
    opacity: 0;
    transform: translateX(100%);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes toastSlideOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }

  to {
    opacity: 0;
    transform: translateX(100%);
  }
}

/* ========== MODAL AGREGAR/EDITAR SERVICIO (Bottom Sheet móvil) ========== */
.admin-modal-sheet {
  transform: translateY(100%);
  transition: transform 0.3s ease-out;
}

.admin-modal-sheet.admin-modal-sheet--open {
  transform: translateY(0);
}

@media (min-width: 640px) {
  .admin-modal-sheet {
    transform: none;
  }

  .admin-modal-sheet.admin-modal-sheet--open {
    transform: none;
  }
}

.admin-modal-input {
  border: 1px solid rgba(229, 231, 235, 0.8);
}

.admin-modal-input:focus {
  border-color: rgb(59, 130, 246);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25);
}

.admin-modal-footer.safe-area-pb {
  padding-bottom: max(1rem, env(safe-area-inset-bottom));
}

/* Select Categoría en modal servicio: mismo look que inputs + chevron */
#service-category {
  padding-right: 2.5rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
  background-size: 1.25rem;
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
}

/* ========== MODAL TIENDA (Crear/Editar) - Bottom Sheet ========== */
.store-modal-sheet {
  transform: translateY(100%);
  transition: transform 0.3s ease-out;
}

.store-modal-sheet.store-modal-sheet--open {
  transform: translateY(0);
}

@media (min-width: 640px) {
  .store-modal-sheet {
    transform: none;
  }

  .store-modal-sheet.store-modal-sheet--open {
    transform: none;
  }
}

.store-modal-input {
  border: 1px solid rgba(229, 231, 235, 0.8);
}

.store-modal-input:focus {
  border-color: rgb(59, 130, 246);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25);
}

.store-modal-footer.store-modal-safe-pb {
  padding-bottom: max(1rem, env(safe-area-inset-bottom));
}

/* ========== TOGGLE DÍAS LABORALES (Formulario Tienda) ========== */
.store-day-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.75rem;
  padding: 0.5rem 0.625rem;
  border-radius: 0.75rem;
  border: 2px solid #e2e8f0;
  background: #f8fafc;
  color: #94a3b8;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.store-day-toggle:hover {
  border-color: #cbd5e1;
  background: #f1f5f9;
}

.store-day-toggle.active {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.store-day-toggle.active:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
}

/* ========== MODAL BLOQUEO — Opciones de Duración ========== */
.block-duration-option {
  display: block;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.block-duration-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  border: 2px solid #e2e8f0;
  border-radius: 0.875rem;
  background: #f8fafc;
  transition: all 0.15s ease;
}

.block-duration-card:hover {
  border-color: #fca5a5;
  background: #fef2f2;
}

.block-duration-card--active {
  border-color: #ef4444;
  background: #fef2f2;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

.block-duration-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}

.block-duration-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 700;
  color: #1e293b;
}

.block-duration-desc {
  display: block;
  font-size: 0.7rem;
  color: #94a3b8;
  margin-top: 1px;
}

.block-duration-check {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid #cbd5e1;
  transition: all 0.15s ease;
}

.block-duration-card--active .block-duration-check {
  border-color: #ef4444;
  background: #ef4444;
  box-shadow: inset 0 0 0 3px #fff;
}

/* ========== MODAL DETALLE ARTISTA (Bottom Sheet) ========== */
.artist-detail-sheet {
  transform: translateY(100%);
  transition: transform 0.3s ease-out;
}

.artist-detail-sheet.artist-detail-sheet--open {
  transform: translateY(0);
}

@media (min-width: 640px) {
  .artist-detail-sheet {
    transform: none;
  }

  .artist-detail-sheet.artist-detail-sheet--open {
    transform: none;
  }
}

/* ========== ADMIN DASHBOARD (Centro de Comando - Premium SaaS) ========== */
.view-container {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

/* Crítico (escritorio): que .view-container con .hidden no sea sobrescrito por display:flex y se oculte siempre */
.view-container.hidden,
#admin-dashboard-view.hidden {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.admin-dashboard-inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  max-width: 640px;
  margin: 0 auto;
  width: 100%;
  padding-top: 8rem;
  /* pt-32: espacio blanco visible entre header fijo y tarjeta azul */
}

/* Welcome Header: degradado azul-índigo */
.admin-dashboard-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 20px 24px;
  margin: 0 16px 16px;
  background: linear-gradient(135deg, var(--color-primary) 0%, #4f46e5 100%);
  border-radius: var(--radius-xl);
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.25);
}

.admin-dashboard-header-left {
  flex: 1;
  min-width: 0;
}

.admin-dashboard-greeting {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-surface);
  margin: 0 0 4px;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.admin-dashboard-subtitle {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.85);
  margin: 0;
}

.admin-dashboard-status-pill {
  flex-shrink: 0;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(8px);
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-surface);
  white-space: nowrap;
}

.admin-dashboard-status-pill.status-closed {
  background: rgba(0, 0, 0, 0.2);
}

/* KPI Widgets (Bento Grid - 3 tarjetas) */
.admin-dashboard-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 0 16px 20px;
}

.admin-kpi-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 6px;
  padding: 16px;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.admin-kpi-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-xs);
}

.admin-kpi-icon--blue {
  background: var(--color-primary-bg);
  color: var(--color-primary);
}

.admin-kpi-icon--violet {
  background: #ede9fe;
  color: #7c3aed;
}

.admin-kpi-icon--yellow {
  background: var(--color-warning-bg);
  color: var(--color-warning);
}

.admin-kpi-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.2;
}

.admin-kpi-label {
  font-size: 0.7rem;
  font-weight: 500;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Gestión Rápida: tarjetas de navegación */
.admin-dashboard-nav {
  padding: 0 16px 24px;
}

.admin-dashboard-nav-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #334155;
  margin: 0 0 16px;
}

.admin-dashboard-nav-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.admin-nav-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  border: 1px solid #f1f5f9;
  box-shadow: var(--shadow-xs);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-align: left;
  min-width: 0;
  overflow: hidden;
}

.admin-nav-card:hover,
.admin-nav-card:active {
  transform: scale(1.02);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.admin-nav-icon {
  width: 48px;
  height: 48px;
  min-width: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
}

.admin-nav-icon--blue {
  background: var(--color-primary-bg);
  color: var(--color-primary);
}

.admin-nav-icon--indigo {
  background: #e0e7ff;
  color: #4f46e5;
}

.admin-nav-icon--green {
  background: var(--color-success-bg);
  color: var(--color-success);
}

.admin-nav-icon--orange {
  background: #ffedd5;
  color: #ea580c;
}

.admin-nav-icon--gray {
  background: var(--color-border);
  color: var(--color-text-secondary);
}

.admin-nav-icon--gray-light {
  background: var(--color-border-light);
  color: var(--color-text-light);
}

.admin-nav-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  overflow: hidden;
}

.admin-nav-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-nav-subtitle {
  font-size: 0.72rem;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-nav-item--dashboard {
  font-weight: 600;
  color: #1e40af;
}

/* SMART REMINDER BANNER ANIMATION */
.smart-reminder-anim {
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: top right;
}

.smart-reminder-hidden {
  opacity: 0;
  transform: translateY(-15px) scale(0.95);
  pointer-events: none;
}

/* ===== SCROLLBAR ESTILO CRISTAL PREMIUM ===== */
/* Ancho y alto súper delgado */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

/* Pista (fondo) totalmente transparente */
::-webkit-scrollbar-track {
  background: transparent;
}

/* Pulgar (la barra que se mueve) con cristal translúcido para modo claro */
::-webkit-scrollbar-thumb {
  background-color: rgba(148, 163, 184, 0.4);
  /* Slate-400 con opacidad */
  border-radius: var(--radius-xs);
}

/* Pulgar al pasar el mouse por encima */
::-webkit-scrollbar-thumb:hover {
  background-color: rgba(148, 163, 184, 0.7);
}

/* Adaptación al Modo Oscuro (Cristal blanco) */
.dark ::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.2);
}

.dark ::-webkit-scrollbar-thumb:hover {
  background-color: rgba(255, 255, 255, 0.4);
}

/* ─── Notification Badge Pulse Animation ─────────────────────────────── */
@keyframes notifPulse {

  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.55);
  }

  50% {
    transform: scale(1.08);
    box-shadow: 0 0 0 5px rgba(239, 68, 68, 0);
  }
}