/* The Event TH - Table Booking System - Custom Styles & Animations */

@import url('https://fonts.googleapis.com/css2?family=Prompt:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&display=swap');

:root {
  --color-stage: #ec4899;
  --color-walkway: #e11d48;
  --color-vvip: #c084fc;
  --color-vip: #facc15;
  --color-normal: #38bdf8;
  --color-booked: #ef4444;
  --color-held: #fb923c;
}

body {
  font-family: 'Prompt', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #0f172a;
}
::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #475569;
}

/* Floor Plan Grid Layout */
.stage-banner {
  background: linear-gradient(135deg, #f43f5e 0%, #e11d48 50%, #be123c 100%);
  box-shadow: 0 0 25px rgba(244, 63, 94, 0.4);
}

.walkway-strip {
  background: linear-gradient(180deg, #e11d48 0%, #be123c 100%);
  box-shadow: 0 0 15px rgba(225, 29, 72, 0.3);
}

/* Table Button Animation & States */
.table-node {
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

.table-node.table-disabled {
  cursor: not-allowed !important;
}

.table-node:hover:not(.table-disabled):not(.table-empty) {
  transform: translateY(-2px) scale(1.08);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  z-index: 10;
}

.table-node:active:not(.table-disabled):not(.table-empty) {
  transform: scale(0.96);
}

.table-node.selected {
  outline: 3px solid #ffffff;
  outline-offset: 2px;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.9);
  animation: pulseSelection 1.5s infinite;
  z-index: 20;
}

@keyframes pulseSelection {
  0%, 100% {
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.8);
  }
  50% {
    box-shadow: 0 0 25px rgba(56, 189, 248, 1);
  }
}

/* Glowing Elements */
.glow-gold {
  box-shadow: 0 0 20px rgba(250, 204, 21, 0.3);
}
.glow-cyan {
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.3);
}
.glow-purple {
  box-shadow: 0 0 20px rgba(192, 132, 252, 0.3);
}

/* Ticket Print Design */
@media print {
  body * {
    visibility: hidden;
  }
  #printable-ticket, #printable-ticket * {
    visibility: visible;
  }
  #printable-ticket {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
  }
}

/* Vertical Catwalk Runway */
.writing-mode-vertical {
  writing-mode: vertical-rl;
  text-orientation: mixed;
}

.walkway-runway {
  background: linear-gradient(180deg, #f43f5e 0%, #be123c 50%, #881337 100%);
  box-shadow: 0 0 20px rgba(244, 63, 94, 0.35);
  position: relative;
  overflow: hidden;
}

.walkway-runway::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 100%;
  background: repeating-linear-gradient(to bottom, rgba(255,255,255,0.4) 0px, rgba(255,255,255,0.4) 8px, transparent 8px, transparent 16px);
}

/* LINE Contact Card (.dcard) */
.dcard {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: rgba(30, 41, 59, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 8px 16px;
  color: #f8fafc;
  text-decoration: none;
  backdrop-filter: blur(10px);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.dcard:hover {
  background: rgba(30, 41, 59, 0.95);
  border-color: #06c755;
  box-shadow: 0 6px 20px rgba(6, 199, 85, 0.25);
  transform: translateY(-2px);
}

.dcard img {
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #06c755;
  flex-shrink: 0;
}

.dmid {
  display: flex;
  flex-direction: column;
  text-align: left;
  line-height: 1.3;
}

.dmid b {
  font-size: 14px;
  font-weight: 700;
  color: #f8fafc;
}

.dmid span {
  font-size: 11px;
  color: #94a3b8;
}

.dbtn {
  background: #06c755;
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 9999px;
  transition: background 0.2s, transform 0.15s;
  box-shadow: 0 2px 8px rgba(6, 199, 85, 0.3);
  margin-left: 4px;
  white-space: nowrap;
}

.dcard:hover .dbtn {
  background: #05b04c;
  transform: scale(1.05);
}

/* Theme Dialogs & Popups (แทน alert & confirm เดิม) */
.theme-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background-color: rgba(3, 7, 18, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: modalFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.theme-modal-card {
  background: linear-gradient(145deg, #0f172a 0%, #1e293b 100%);
  border: 1px solid rgba(244, 63, 94, 0.3);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.75), 0 0 35px rgba(244, 63, 94, 0.12);
  border-radius: 1.25rem;
  width: 100%;
  padding: 1.5rem;
  position: relative;
  transform-origin: center;
  animation: modalPopIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.theme-modal-card.theme-amber {
  border-color: rgba(245, 158, 11, 0.4);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.75), 0 0 35px rgba(245, 158, 11, 0.15);
}

.theme-modal-card.theme-indigo {
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.75), 0 0 35px rgba(99, 102, 241, 0.15);
}

.theme-modal-card.theme-cyan {
  border-color: rgba(6, 182, 212, 0.4);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.75), 0 0 35px rgba(6, 182, 212, 0.15);
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modalPopIn {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

/* Theme Toast System */
.theme-toast-container {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 120;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  pointer-events: none;
}

.theme-toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  border-radius: 0.875rem;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
  font-size: 0.8125rem;
  font-weight: 500;
  color: #f8fafc;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transform: translateX(100%);
  animation: toastSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes toastSlideIn {
  to { transform: translateX(0); }
}

.theme-toast.success {
  border-color: rgba(16, 185, 129, 0.4);
  box-shadow: 0 8px 25px -5px rgba(16, 185, 129, 0.25);
}
.theme-toast.error {
  border-color: rgba(244, 63, 94, 0.4);
  box-shadow: 0 8px 25px -5px rgba(244, 63, 94, 0.25);
}
.theme-toast.info {
  border-color: rgba(56, 189, 248, 0.4);
  box-shadow: 0 8px 25px -5px rgba(56, 189, 248, 0.25);
}

/* Mini Map Proportional Alignment Grid */
.mini-grid-cell {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: monospace;
  font-size: 9px;
  font-weight: 800;
  border-radius: 3px;
  flex-shrink: 0;
  transition: transform 0.15s ease;
}

@media (max-width: 640px) {
  .mini-grid-cell {
    width: 17px;
    height: 17px;
    font-size: 8px;
  }
}
