/* ==============================================================================
   MyFanTicket / BoletoEC - Modern Design System Stylesheet
   Themes: Andean Beat (Dark Mode) & Andean Pulse Light (Light Mode)
   Features: F17, F18, F19, F20, F21 (Interactive SVG Map, Dynamic QR, Modals)
   ============================================================================== */

@layer utilities {
  .stage-glow {
    filter: drop-shadow(0 4px 25px rgba(255, 70, 85, 0.45));
  }
}

/* Event card highlight animation when jumped from search */
@keyframes event-card-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 70, 85, 0.7);
    outline: 2px solid #ff4655;
  }
  50% {
    box-shadow: 0 0 35px 8px rgba(255, 70, 85, 0.5);
    outline: 2px solid #ff4655;
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 70, 85, 0);
    outline: 2px solid transparent;
  }
}

.event-highlight-pulse {
  animation: event-card-pulse 2s ease-out;
}

/* Base Body Smoothing & Fonts */
html {
  font-family: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  overflow-x: hidden;
  overflow-y: auto;
  scroll-behavior: smooth;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.3);
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, 0.5);
}

/* Typography Helpers */
.font-heading {
  font-family: 'Plus Jakarta Sans', sans-serif;
}
.font-mono-num {
  font-family: 'Space Grotesk', monospace;
}

/* ------------------------------------------------------------------------------
   SVG Interactive Seat Map Styling (F18)
   ------------------------------------------------------------------------------ */

.seat {
  cursor: pointer;
  transition: transform 0.15s ease, fill 0.2s ease, stroke 0.2s ease, filter 0.2s ease;
  transform-box: fill-box;
  transform-origin: center;
  outline: none;
}

/* Available Seat (Green / Emerald) */
.seat-available {
  fill: #10b981; /* emerald-500 */
  stroke: #047857; /* emerald-700 */
  stroke-width: 1.5px;
}

.seat-available:hover {
  fill: #34d399; /* emerald-400 */
  filter: drop-shadow(0 0 8px rgba(16, 185, 129, 0.85));
  transform: scale(1.22);
}

/* Selected Seat (Electric Vermillion / Coral Pulse) */
.seat-selected {
  fill: #ff4655; /* Andean coral-red */
  stroke: #ffffff;
  stroke-width: 2.5px;
  filter: drop-shadow(0 0 10px rgba(255, 70, 85, 0.95));
  animation: seat-pulse 2s infinite ease-in-out;
}

.seat-selected:hover {
  transform: scale(1.25);
}

/* Locked Seat (Amber / Gold) */
.seat-locked {
  fill: #f59e0b; /* amber-500 */
  stroke: #b45309; /* amber-700 */
  stroke-width: 1.5px;
  cursor: not-allowed;
  opacity: 0.85;
}

.seat-locked:hover {
  transform: scale(1.05);
}

/* Sold Seat (Muted Slate / Gray) */
.seat-sold {
  fill: #64748b; /* slate-500 */
  stroke: #334155; /* slate-700 */
  stroke-width: 1.2px;
  cursor: not-allowed;
  opacity: 0.4;
}

.seat-sold:hover {
  transform: none;
}

/* Dynamic SVG Row Labels */
.row-label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11px;
  font-weight: 700;
  fill: #94a3b8;
  user-select: none;
  pointer-events: none;
}

/* Stage Header Styling */
#stage-element {
  transition: all 0.3s ease;
}

/* ------------------------------------------------------------------------------
   Pulsating & Keyframe Animations
   ------------------------------------------------------------------------------ */

@keyframes seat-pulse {
  0%, 100% {
    transform: scale(1);
    filter: drop-shadow(0 0 6px rgba(255, 70, 85, 0.7));
  }
  50% {
    transform: scale(1.15);
    filter: drop-shadow(0 0 14px rgba(255, 70, 85, 0.95));
  }
}

@keyframes fade-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
  animation: fade-in 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Anti-Fraud Laser Scanning Beam Animation */
@keyframes laser-scan {
  0% {
    top: 0%;
    opacity: 0.8;
  }
  50% {
    top: 96%;
    opacity: 1;
  }
  100% {
    top: 0%;
    opacity: 0.8;
  }
}

.animate-laser-scan {
  animation: laser-scan 2.4s ease-in-out infinite;
}

/* ------------------------------------------------------------------------------
   Tactile Ticket Architecture & Notch Cutouts
   ------------------------------------------------------------------------------ */

.ticket-notch-left {
  position: absolute;
  left: -14px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-color: var(--canvas-bg, #0f131d);
  z-index: 10;
}

.ticket-notch-right {
  position: absolute;
  right: -14px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-color: var(--canvas-bg, #0f131d);
  z-index: 10;
}

html.light {
  --canvas-bg: #faf8ff;
}
html.dark {
  --canvas-bg: #0f131d;
}

/* Holographic Anti-Copy Watermark Animations (F20) */
@keyframes holographic-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes holographicShimmer {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes float-pattern {
  0% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-6px) rotate(1deg); }
  100% { transform: translateY(0px) rotate(0deg); }
}

.holographic-sheen {
  background: linear-gradient(
    135deg,
    rgba(255, 70, 85, 0.15) 0%,
    rgba(0, 218, 243, 0.25) 25%,
    rgba(255, 185, 95, 0.2) 50%,
    rgba(16, 185, 129, 0.15) 75%,
    rgba(255, 70, 85, 0.15) 100%
  );
  background-size: 300% 300%;
  animation: holographic-shift 6s ease infinite;
}

.holographic-card {
  background: linear-gradient(135deg, #0f131d 0%, #1c1f2a 35%, #171b26 70%, #0f131d 100%);
  background-size: 300% 300%;
  animation: holographicShimmer 12s ease infinite;
}

.holographic-badge {
  background: linear-gradient(90deg, #ff4655, #f59e0b, #00daf3, #10b981, #ff4655);
  background-size: 200% auto;
  animation: holographicShimmer 4s linear infinite;
}

.floating-watermark {
  animation: float-pattern 6s ease-in-out infinite;
}

/* 30s Countdown Progress Bar Transition */
.progress-bar-smooth {
  transition: width 1s linear;
}

.progress-bar {
  transition: width 0.3s ease-in-out;
}

/* ------------------------------------------------------------------------------
   Viewport Dragging Cursor State
   ------------------------------------------------------------------------------ */

#seat-map-container.panning {
  cursor: grabbing !important;
  user-select: none;
}

#seat-map-container:not(.panning) {
  cursor: grab;
}

/* ------------------------------------------------------------------------------
   Sticky Selection Drawer & Chips
   ------------------------------------------------------------------------------ */

.seat-chip {
  animation: fade-in 0.2s ease forwards;
}

/* ------------------------------------------------------------------------------
   Toast Notifications
   ------------------------------------------------------------------------------ */

.toast-item {
  animation: slide-in-toast 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slide-in-toast {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ------------------------------------------------------------------------------
   Header Search Bar & Input High-Visibility
   ------------------------------------------------------------------------------ */

:root {
  --nav-search-color: #0f172a;
  --nav-search-bg: #f1f5f9;
}

html.dark, :root.dark {
  --nav-search-color: #ffffff;
  --nav-search-bg: #141824;
}

#header-nav-search-input {
  color: #0f172a !important;
  -webkit-text-fill-color: #0f172a !important;
  background-color: #f1f5f9 !important;
  caret-color: #ff4655 !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  opacity: 1 !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

html.dark #header-nav-search-input,
.dark #header-nav-search-input {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  background-color: #141824 !important;
  caret-color: #ff4655 !important;
  border-color: #262c3d !important;
}

#header-nav-search-input:focus {
  color: #0f172a !important;
  -webkit-text-fill-color: #0f172a !important;
  background-color: #ffffff !important;
  border-color: #ff4655 !important;
  box-shadow: 0 0 0 3px rgba(255, 70, 85, 0.16), 0 4px 12px rgba(255, 70, 85, 0.08) !important;
}

html.dark #header-nav-search-input:focus,
.dark #header-nav-search-input:focus {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  background-color: #0e121a !important;
  border-color: #ff4655 !important;
  box-shadow: 0 0 0 3px rgba(255, 70, 85, 0.22), 0 4px 16px rgba(255, 70, 85, 0.12) !important;
}

#header-nav-search-input::placeholder {
  color: #94a3b8 !important;
  -webkit-text-fill-color: #94a3b8 !important;
  font-weight: 400 !important;
  opacity: 1 !important;
}

html.dark #header-nav-search-input::placeholder,
.dark #header-nav-search-input::placeholder {
  color: #94a3b8 !important;
  -webkit-text-fill-color: #94a3b8 !important;
  font-weight: 400 !important;
  opacity: 1 !important;
}

#header-search-input {
  color: #0f172a !important;
  -webkit-text-fill-color: #0f172a !important;
  caret-color: #ff4655 !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  opacity: 1 !important;
}

html.dark #header-search-input,
.dark #header-search-input {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  caret-color: #ff4655 !important;
}

#header-search-input:focus {
  color: #0f172a !important;
  -webkit-text-fill-color: #0f172a !important;
}

html.dark #header-search-input:focus,
.dark #header-search-input:focus {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

#header-search-btn {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

#header-search-btn:hover {
  transform: translateY(-50%) scale(1.02) !important;
  box-shadow: 0 4px 14px rgba(255, 70, 85, 0.35) !important;
}

#header-search-btn:active {
  transform: translateY(-50%) scale(0.96) !important;
}


