/* ==========================================================================
   HOSTZAP DESIGN SYSTEM
   Baseado em princípios modernos de UI/UX, Glassmorphism, Microinterações
   ========================================================================== */

:root {
  /* Brand Colors */
  --hz-color-primary: #2D1B69;       /* Roxo Principal */
  --hz-color-primary-hover: #3a2680;
  --hz-color-primary-light: #ece9f5;
  --hz-color-secondary: #F5A623;     /* Amarelo/Dourado */
  --hz-color-secondary-hover: #e09214;
  --hz-color-dark: #1A1033;          /* Fundo Escuro / Texto Primário */
  
  /* Surfaces & Backgrounds */
  --hz-bg-canvas: #f8f9fc;           /* Fundo da aplicação */
  --hz-surface-1: #ffffff;           /* Cards e painéis principais */
  --hz-surface-2: #f1f3f5;           /* Inputs e hovers sutis */
  
  /* Text Colors */
  --hz-text-primary: #1A1033;
  --hz-text-secondary: #4b5563;
  --hz-text-muted: #9ca3af;
  --hz-text-inverse: #ffffff;
  
  /* Semantic Colors */
  --hz-color-success: #10b981;
  --hz-color-success-bg: #d1fae5;
  --hz-color-warning: #f59e0b;
  --hz-color-warning-bg: #fef3c7;
  --hz-color-error: #ef4444;
  --hz-color-error-bg: #fee2e2;
  --hz-color-info: #3b82f6;
  --hz-color-info-bg: #dbeafe;

  /* Spacing Scale (4px base) */
  --hz-space-1: 4px;
  --hz-space-2: 8px;
  --hz-space-3: 12px;
  --hz-space-4: 16px;
  --hz-space-5: 20px;
  --hz-space-6: 24px;
  --hz-space-8: 32px;
  --hz-space-10: 40px;
  --hz-space-12: 48px;
  --hz-space-16: 64px;

  /* Border Radius */
  --hz-radius-sm: 6px;
  --hz-radius-md: 12px;
  --hz-radius-lg: 16px;
  --hz-radius-xl: 24px;
  --hz-radius-full: 9999px;

  /* Shadows */
  --hz-shadow-sm: 0 1px 3px rgba(0,0,0,.08);
  --hz-shadow-md: 0 4px 16px rgba(0,0,0,.08);
  --hz-shadow-lg: 0 8px 32px rgba(0,0,0,.12);
  --hz-shadow-brand: 0 4px 24px rgba(45, 27, 105, .35);

  /* Typography */
  --hz-font-family: 'Poppins', system-ui, -apple-system, sans-serif;
  --hz-text-xs: 0.75rem;     /* 12px */
  --hz-text-sm: 0.875rem;    /* 14px */
  --hz-text-base: 1rem;      /* 16px */
  --hz-text-lg: 1.125rem;    /* 18px */
  --hz-text-xl: 1.25rem;     /* 20px */
  --hz-text-2xl: 1.5rem;     /* 24px */
  
  /* Transitions */
  --hz-transition-fast: 150ms ease-in-out;
  --hz-transition-base: 250ms ease-in-out;
}

/* ==========================================================================
   Base
   ========================================================================== */
body {
  font-family: var(--hz-font-family) !important;
  color: var(--hz-text-primary);
  background-color: var(--hz-bg-canvas);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ==========================================================================
   Componentes: Botões
   ========================================================================== */
.hz-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--hz-space-2);
  padding: var(--hz-space-3) var(--hz-space-6);
  border-radius: var(--hz-radius-full);
  font-weight: 600;
  font-size: var(--hz-text-sm);
  text-align: center;
  cursor: pointer;
  transition: all var(--hz-transition-base);
  border: none;
  min-height: 44px; /* Touch target minimum */
  line-height: 1;
}

.hz-btn:active {
  transform: scale(0.97);
}

.hz-btn:focus-visible {
  outline: 2px solid var(--hz-color-primary);
  outline-offset: 2px;
}

.hz-btn-primary {
  background-color: var(--hz-color-primary);
  color: var(--hz-text-inverse);
  box-shadow: var(--hz-shadow-sm);
}

.hz-btn-primary:hover {
  background-color: var(--hz-color-primary-hover);
  box-shadow: var(--hz-shadow-md);
  color: var(--hz-text-inverse);
}

.hz-btn-secondary {
  background-color: var(--hz-color-secondary);
  color: var(--hz-text-inverse);
}

.hz-btn-secondary:hover {
  background-color: var(--hz-color-secondary-hover);
  box-shadow: var(--hz-shadow-brand);
  color: var(--hz-text-inverse);
}

.hz-btn-ghost {
  background-color: transparent;
  color: var(--hz-color-primary);
  border: 1px solid var(--hz-color-primary);
}

.hz-btn-ghost:hover {
  background-color: var(--hz-color-primary-light);
}

/* ==========================================================================
   Componentes: Inputs e Forms
   ========================================================================== */
.hz-input {
  width: 100%;
  padding: var(--hz-space-3) var(--hz-space-4);
  border-radius: var(--hz-radius-md);
  border: 1px solid var(--hz-surface-2);
  background-color: var(--hz-surface-2);
  color: var(--hz-text-primary);
  font-size: var(--hz-text-base);
  transition: all var(--hz-transition-fast);
  min-height: 48px; /* Otimizado para mobile */
}

.hz-input:focus {
  outline: none;
  border-color: var(--hz-color-primary);
  background-color: var(--hz-surface-1);
  box-shadow: 0 0 0 3px rgba(45, 27, 105, 0.1);
}

.hz-label {
  display: block;
  font-size: var(--hz-text-sm);
  font-weight: 500;
  color: var(--hz-text-secondary);
  margin-bottom: var(--hz-space-2);
}

/* ==========================================================================
   Componentes: Cards
   ========================================================================== */
.hz-card {
  background: var(--hz-surface-1);
  border-radius: var(--hz-radius-lg);
  box-shadow: var(--hz-shadow-sm);
  padding: var(--hz-space-4);
  transition: transform var(--hz-transition-base), box-shadow var(--hz-transition-base);
}

.hz-card-interactive:hover {
  transform: translateY(-4px);
  box-shadow: var(--hz-shadow-md);
}

/* ==========================================================================
   Componentes: Badges
   ========================================================================== */
.hz-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--hz-radius-full);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.hz-badge-success { background: var(--hz-color-success-bg); color: var(--hz-color-success); }
.hz-badge-warning { background: var(--hz-color-warning-bg); color: var(--hz-color-warning); }
.hz-badge-error { background: var(--hz-color-error-bg); color: var(--hz-color-error); }
.hz-badge-info { background: var(--hz-color-info-bg); color: var(--hz-color-info); }
.hz-badge-brand { background: var(--hz-color-primary-light); color: var(--hz-color-primary); }

/* ==========================================================================
   Utilitários & Layout
   ========================================================================== */
.hz-glassmorphism {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

/* Esconder scrollbar mas manter scroll */
.hz-no-scrollbar::-webkit-scrollbar {
  display: none;
}
.hz-no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* ==========================================================================
   Animações
   ========================================================================== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.hz-animate-fade-in-up {
  animation: fadeInUp 0.4s ease-out forwards;
}

/* Shimmer Loading Skeleton */
@keyframes shimmer {
  0% { background-position: -1000px 0; }
  100% { background-position: 1000px 0; }
}

.hz-skeleton {
  background: #f6f7f8;
  background-image: linear-gradient(to right, #f6f7f8 0%, #edeef1 20%, #f6f7f8 40%, #f6f7f8 100%);
  background-repeat: no-repeat;
  background-size: 1000px 100%; 
  animation: shimmer 2s infinite linear forwards;
}

/* ==========================================================================
   Dot Pulsante de Status (Aberto/Fechado)
   ========================================================================== */
@keyframes pulse-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.5); opacity: 0.6; }
}

.hz-status-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}

.hz-status-dot-open {
  background-color: var(--hz-color-success);
  animation: pulse-dot 2s infinite ease-in-out;
}

.hz-status-dot-closed {
  background-color: var(--hz-color-error);
}

/* ==========================================================================
   Melhorias Globais de Formulários
   ========================================================================== */
.form-field-default input[type="text"],
.form-field-default input[type="email"],
.form-field-default input[type="tel"],
.form-field-default input[type="number"],
.form-field-default input[type="password"],
.form-field-default textarea,
.form-field-default select {
  border-radius: var(--hz-radius-md) !important;
  border: 1.5px solid #e2e5ea !important;
  padding: 12px 14px !important;
  font-size: var(--hz-text-sm) !important;
  transition: border-color var(--hz-transition-fast), box-shadow var(--hz-transition-fast) !important;
  min-height: 44px;
}

.form-field-default input:focus,
.form-field-default textarea:focus,
.form-field-default select:focus {
  border-color: var(--hz-color-primary) !important;
  box-shadow: 0 0 0 3px rgba(45, 27, 105, 0.08) !important;
  outline: none !important;
}

.form-field-default label {
  font-size: var(--hz-text-sm) !important;
  font-weight: 500 !important;
  color: var(--hz-text-secondary) !important;
  margin-bottom: 6px !important;
}

/* ==========================================================================
   Melhorias nos Menus do Admin (lista-menus)
   ========================================================================== */
.lista-menus-menu {
  border-radius: var(--hz-radius-md) !important;
  transition: transform var(--hz-transition-base), box-shadow var(--hz-transition-base) !important;
  overflow: hidden;
}

.lista-menus-menu:hover {
  transform: translateY(-2px);
  box-shadow: var(--hz-shadow-md) !important;
}

.lista-menus-menu .bt {
  border-radius: var(--hz-radius-md) !important;
}

/* ==========================================================================
   Melhorias em Tabelas (Admin)
   ========================================================================== */
.listing-table {
  border-radius: var(--hz-radius-md) !important;
  overflow: hidden;
  border: 1px solid #e9ecef !important;
}

.listing-table thead th {
  background: var(--hz-surface-2) !important;
  font-size: var(--hz-text-xs) !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
  color: var(--hz-text-secondary) !important;
  padding: 12px 16px !important;
  border-bottom: 2px solid #e2e5ea !important;
}

.listing-table tbody tr {
  transition: background-color var(--hz-transition-fast) !important;
}

.listing-table tbody tr:hover {
  background-color: rgba(45, 27, 105, 0.03) !important;
}

.listing-table tbody td {
  padding: 12px 16px !important;
  vertical-align: middle !important;
  border-bottom: 1px solid #f0f2f5 !important;
}

/* ==========================================================================
   Melhorias nos Painéis/Acordeões (Admin)
   ========================================================================== */
.panel-default {
  border-radius: var(--hz-radius-md) !important;
  border: 1px solid #e9ecef !important;
  box-shadow: var(--hz-shadow-sm) !important;
  overflow: hidden;
}

.panel-default > .panel-heading {
  border-radius: var(--hz-radius-md) var(--hz-radius-md) 0 0 !important;
}

/* ==========================================================================
   Botão de Ação Global (botao-acao) — Melhoria
   ========================================================================== */
.botao-acao {
  border-radius: var(--hz-radius-full) !important;
  transition: all var(--hz-transition-base) !important;
  min-height: 44px;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.botao-acao:hover {
  box-shadow: var(--hz-shadow-md) !important;
  filter: brightness(1.1);
}

.botao-acao:active {
  transform: scale(0.97);
}

/* ==========================================================================
   Navegador de Categorias — Cardápio (scroll horizontal)
   ========================================================================== */
.tv-infinite-menu {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.tv-infinite-menu::-webkit-scrollbar {
  display: none;
}

.tv-infinite-menu a {
  transition: all var(--hz-transition-fast) !important;
  border-radius: var(--hz-radius-full) !important;
}

.tv-infinite-menu a.active {
  box-shadow: var(--hz-shadow-sm) !important;
}

/* ==========================================================================
   Banners — Cardápio
   ========================================================================== */
.banners .carousel-inner .item img {
  border-radius: var(--hz-radius-lg) !important;
}

/* ==========================================================================
   Produtos — Efeitos Hover no Card Antigo
   ========================================================================== */
.produtoatual,
.novoproduto {
  border-radius: var(--hz-radius-md) !important;
  transition: transform var(--hz-transition-base), box-shadow var(--hz-transition-base) !important;
  overflow: hidden;
}

.produtoatual:hover,
.novoproduto:hover {
  transform: translateY(-4px);
  box-shadow: var(--hz-shadow-md) !important;
}

.produtoatual .capa,
.novoproduto .capa img {
  border-radius: var(--hz-radius-md) !important;
}

/* ==========================================================================
   Animação de Entrada em Cascata (Stagger)
   ========================================================================== */
.hz-stagger > * {
  opacity: 0;
  animation: fadeInUp 0.4s ease-out forwards;
}

.hz-stagger > *:nth-child(1) { animation-delay: 0ms; }
.hz-stagger > *:nth-child(2) { animation-delay: 80ms; }
.hz-stagger > *:nth-child(3) { animation-delay: 160ms; }
.hz-stagger > *:nth-child(4) { animation-delay: 240ms; }
.hz-stagger > *:nth-child(5) { animation-delay: 320ms; }
.hz-stagger > *:nth-child(6) { animation-delay: 400ms; }
.hz-stagger > *:nth-child(7) { animation-delay: 480ms; }
.hz-stagger > *:nth-child(8) { animation-delay: 560ms; }

/* ==========================================================================
   Checkmark Animado (Confirmação de Pedido)
   ========================================================================== */
@keyframes checkmark-draw {
  from { stroke-dashoffset: 100; }
  to { stroke-dashoffset: 0; }
}

.hz-checkmark-circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--hz-color-success);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  animation: fadeInUp 0.5s ease-out;
}

.hz-checkmark-circle i {
  color: #fff;
  font-size: 36px;
}

/* ==========================================================================
   Responsividade — Mobile First
   ========================================================================== */
@media (max-width: 991px) {
  /* Touch targets mínimos de 44px */
  .botao-acao,
  .hz-btn,
  .sacola-adicionar,
  .sacola-remover,
  .campo-numero i {
    min-height: 44px !important;
    min-width: 44px !important;
  }

  /* Cards de produto com margem melhorada */
  .novoproduto,
  .produtoatual {
    margin-bottom: 12px !important;
  }

  /* Inputs de formulário com tamanho mobile */
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="number"],
  textarea,
  select {
    font-size: 16px !important; /* Previne zoom no iOS */
  }
}

/* ==========================================================================
   Acessibilidade — prefers-reduced-motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ==========================================================================
   Botão Success (WhatsApp / Contato)
   ========================================================================== */
.hz-btn-success {
  background-color: var(--hz-color-success);
  color: var(--hz-text-inverse);
}

.hz-btn-success:hover {
  background-color: #059669;
  box-shadow: var(--hz-shadow-md);
  color: var(--hz-text-inverse);
}

/* ==========================================================================
   Botão Danger
   ========================================================================== */
.hz-btn-danger {
  background-color: var(--hz-color-error);
  color: var(--hz-text-inverse);
}

.hz-btn-danger:hover {
  background-color: #dc2626;
  box-shadow: var(--hz-shadow-md);
  color: var(--hz-text-inverse);
}
