/* Estilos Customizados para o Super App BabyShower da Laura */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Outfit:wght@400;500;600;700;800;900&display=swap');

:root {
  --font-main: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-heading: 'Outfit', system-ui, -apple-system, sans-serif;
}

* {
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-main);
  background-color: #080c16;
  color: #f1f5f9;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
}

/* Glassmorphism Styles */
.glass-panel {
  background: rgba(13, 18, 30, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.glass-card {
  background: rgba(19, 27, 44, 0.65);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.07);
  transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
  border-color: rgba(251, 191, 36, 0.25);
  box-shadow: 0 16px 36px -12px rgba(0, 0, 0, 0.6);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #090d16;
}
::-webkit-scrollbar-thumb {
  background: #27354a;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #3b4e6b;
}

/* Touch-Optimized Range Input */
input[type="range"] {
  -webkit-appearance: none;
  background: transparent;
  cursor: pointer;
  height: 28px; /* Maior área de toque para mobile */
}

input[type="range"]::-webkit-slider-runnable-track {
  background: rgba(51, 65, 85, 0.6);
  height: 8px;
  border-radius: 999px;
  transition: background-color 0.2s ease;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  height: 22px;
  width: 22px;
  border-radius: 50%;
  background: #fbbf24;
  margin-top: -7px;
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.6), 0 2px 6px rgba(0, 0, 0, 0.4);
  transition: transform 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
  border: 2px solid #fff;
}

input[type="range"]:active::-webkit-slider-thumb {
  transform: scale(1.25);
  background: #f59e0b;
  box-shadow: 0 0 18px rgba(245, 158, 11, 0.8);
}

/* IOS-Style Sleek Switch Component */
.switch-container {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.switch-track {
  width: 44px;
  height: 24px;
  background-color: rgba(51, 65, 85, 0.7);
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.switch-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  background-color: #ffffff;
  border-radius: 50%;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
}

.switch-container.active-pink .switch-track {
  background: linear-gradient(135deg, #ec4899, #f43f5e);
  border-color: rgba(244, 63, 94, 0.4);
  box-shadow: 0 0 12px rgba(236, 72, 153, 0.4);
}
.switch-container.active-pink .switch-thumb {
  transform: translateX(20px);
  color: #ec4899;
}

.switch-container.active-emerald .switch-track {
  background: linear-gradient(135deg, #10b981, #059669);
  border-color: rgba(16, 185, 129, 0.4);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.4);
}
.switch-container.active-emerald .switch-thumb {
  transform: translateX(20px);
  color: #10b981;
}

/* Custom Dropdown Styling */
.custom-dropdown-btn {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #f1f5f9;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.custom-dropdown-btn:hover {
  background: rgba(30, 41, 59, 0.9);
  border-color: rgba(251, 191, 36, 0.4);
}

/* Elevação de Stacking Context para Dropdowns em Tabelas e Cards */
.guest-talla-dropdown {
  position: relative;
}

.guest-talla-dropdown.is-open {
  position: relative !important;
  z-index: 10001 !important;
}

tr:has(.custom-dropdown-menu.open),
tr.has-dropdown-open,
tr.has-dropdown-open td,
tr:has(.custom-dropdown-menu.open) td,
td.has-dropdown-open {
  position: relative !important;
  z-index: 9999 !important;
}

.glass-card:has(.custom-dropdown-menu.open),
.glass-card.has-dropdown-open {
  position: relative !important;
  z-index: 9999 !important;
}

tbody tr td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.custom-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 175px;
  background: rgba(15, 23, 42, 0.98);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.08);
  padding: 6px;
  z-index: 10000 !important;
  display: none;
  opacity: 0;
  transform: scale(0.95) translateY(-6px);
  transform-origin: top left;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.custom-dropdown-menu.open {
  display: block;
  opacity: 1;
  transform: scale(1) translateY(0);
}

.custom-dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 500;
  color: #cbd5e1;
  cursor: pointer;
  transition: all 0.15s ease;
}

.custom-dropdown-item:hover, .custom-dropdown-item.selected {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

/* Animations & Splash Screen */
#app-preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #080c16;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

#app-preloader.fade-out {
  opacity: 0;
  transform: scale(1.04);
  pointer-events: none;
}

.spinner-ring {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: 3px solid transparent;
  border-top-color: #fbbf24;
  border-right-color: #f472b6;
  border-bottom-color: #38bdf8;
  animation: spinRing 1.5s cubic-bezier(0.68, -0.55, 0.27, 1.55) infinite;
}

@keyframes spinRing {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes floatGentle {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-8px) rotate(2deg); }
}

.animate-float {
  animation: floatGentle 4s ease-in-out infinite;
}

/* Confetti particles canvas */
#canvas-particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 5;
  opacity: 0.75;
}

/* Heatmap Row Highlights */
.heat-high {
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.12) 0%, rgba(16, 185, 129, 0.02) 100%);
}
.heat-mid {
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.12) 0%, rgba(245, 158, 11, 0.02) 100%);
}
.heat-low {
  background: linear-gradient(90deg, rgba(239, 68, 68, 0.10) 0%, rgba(239, 68, 68, 0.01) 100%);
}

/* Status Indicator */
.live-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #22c55e;
  box-shadow: 0 0 10px #22c55e;
  animation: livePulse 2s infinite;
}

@keyframes livePulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.25); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

/* Scroll-Driven Reveal Animations (Estilo Apple / Linear / Stripe) */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(30px) scale(0.98);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-on-scroll.revealed {
  opacity: 1 !important;
  transform: translateY(0) scale(1) !important;
}

/* Cascata Animada para Linhas da Tabela (60fps) */
tr.reveal-table-row {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

tr.reveal-table-row.revealed {
  opacity: 1 !important;
  transform: none !important;
  will-change: auto !important;
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.92) translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-scale.revealed {
  opacity: 1 !important;
  transform: scale(1) translateY(0) !important;
}

.reveal-left {
  opacity: 0;
  transform: translateX(-35px);
  transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1), transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-left.revealed {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(35px);
  transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1), transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-right.revealed {
  opacity: 1;
  transform: translateX(0);
}

/* Stagger Delays para grids e listas */
.stagger-1 { transition-delay: 60ms; }
.stagger-2 { transition-delay: 120ms; }
.stagger-3 { transition-delay: 180ms; }
.stagger-4 { transition-delay: 240ms; }
.stagger-5 { transition-delay: 300ms; }
.stagger-6 { transition-delay: 360ms; }
.stagger-7 { transition-delay: 420ms; }
.stagger-8 { transition-delay: 480ms; }

/* Stagger Animation Utility */
.animate-entrance {
  animation: entranceAnim 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes entranceAnim {
  0% {
    opacity: 0;
    transform: translateY(24px) scale(0.98);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Prevenir scroll do background quando modal está aberto */
body.modal-open {
  overflow: hidden !important;
  height: 100vh !important;
  touch-action: none;
}

/* Correção de Scroll da Tabela Desktop (Zero Scrollbar Aninhada) */
#guests-table-container {
  overflow-x: auto;
  overflow-y: visible;
  overscroll-behavior: auto;
}

@media (min-width: 900px) {
  #guests-table-container {
    overflow: visible !important;
  }
}

/* Drag & Drop Styling */
.drag-handle {
  touch-action: none;
  cursor: grab;
  user-select: none;
  transition: transform 0.15s ease, color 0.15s ease;
}
.drag-handle:hover {
  color: #ec4899;
  transform: scale(1.18);
}
.drag-handle:active {
  cursor: grabbing;
}

tr.is-dragging, .glass-card.is-dragging {
  opacity: 0.45 !important;
  background: rgba(236, 72, 153, 0.08) !important;
  border: 1px dashed rgba(236, 72, 153, 0.6) !important;
  transform: scale(0.99);
}

tr.drag-over-top, .glass-card.drag-over-top {
  border-top: 2px solid #ec4899 !important;
  box-shadow: 0 -4px 12px rgba(236, 72, 153, 0.35);
}

tr.drag-over-bottom, .glass-card.drag-over-bottom {
  border-bottom: 2px solid #ec4899 !important;
  box-shadow: 0 4px 12px rgba(236, 72, 153, 0.35);
}

/* Animação suave para remoção pontual de item (sem recarregar o todo) */
.glass-card.item-exit-animation,
.glass-card.reveal-on-scroll.revealed.item-exit-animation {
  animation: cardExitAnim 0.35s cubic-bezier(0.4, 0, 0.2, 1) forwards !important;
  pointer-events: none !important;
}

tr.item-exit-animation,
tr.reveal-table-row.revealed.item-exit-animation {
  animation: rowExitAnim 0.35s cubic-bezier(0.4, 0, 0.2, 1) forwards !important;
  pointer-events: none !important;
}

tr.item-exit-animation td,
tr.reveal-table-row.revealed.item-exit-animation td {
  animation: cellExitAnim 0.35s cubic-bezier(0.4, 0, 0.2, 1) forwards !important;
  pointer-events: none !important;
}

@keyframes cardExitAnim {
  0% {
    opacity: 1;
    transform: scale(1) translateX(0);
    filter: blur(0);
  }
  30% {
    opacity: 0.85;
    background: rgba(244, 63, 94, 0.2) !important;
    border-color: rgba(244, 63, 94, 0.6) !important;
    transform: scale(0.98) translateX(-8px);
  }
  100% {
    opacity: 0;
    transform: scale(0.85) translateX(70px);
    filter: blur(4px);
  }
}

@keyframes rowExitAnim {
  0% {
    opacity: 1;
  }
  30% {
    opacity: 0.9;
    background-color: rgba(244, 63, 94, 0.25) !important;
  }
  100% {
    opacity: 0;
    background-color: rgba(244, 63, 94, 0.05) !important;
  }
}

@keyframes cellExitAnim {
  0% {
    opacity: 1;
    transform: translateX(0);
  }
  100% {
    opacity: 0;
    transform: translateX(60px);
  }
}

.item-entrance-animation {
  animation: itemEntrance 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes itemEntrance {
  0% {
    opacity: 0;
    transform: translateY(-16px) scale(0.97);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}



