/* ==========================================================================
   MyFanTicket (BoletoEC) - Minimalist Custom Styles & Light/Dark Theme Engine
   ========================================================================== */

:root {
  --font-sans: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, sans-serif;
  --font-heading: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'Space Grotesk', 'JetBrains Mono', monospace;
}

body {
  font-family: var(--font-sans);
  overflow-x: hidden;
  letter-spacing: -0.01em;
}

.font-heading {
  font-family: var(--font-heading);
}

.font-mono {
  font-family: var(--font-mono);
}

/* --------------------------------------------------------------------------
   Minimalist Refinements (Cleaner cards, subtler borders, less visual noise)
   -------------------------------------------------------------------------- */
[data-event-card] {
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s ease, border-color 0.22s ease;
}

[data-event-card]:hover {
  transform: translateY(-3px);
}

/* --------------------------------------------------------------------------
   Comprehensive Light Mode (html.light) Overrides
   Fixes dark-on-dark backgrounds when switching to Light Mode
   -------------------------------------------------------------------------- */
html.light,
html.light body {
  background-color: #f8fafc !important;
  color: #0f172a !important;
}

html:not(.dark) {
  --nav-search-color: #0f172a;
}

html.dark {
  --nav-search-color: #ffffff;
}

html.light #app-header {
  background-color: rgba(255, 255, 255, 0.92) !important;
  border-bottom-color: #e2e8f0 !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04) !important;
}

html.light #figma-hero-section {
  background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 60%, #fff1f2 100%) !important;
  border-color: #cbd5e1 !important;
  box-shadow: 0 12px 32px -8px rgba(15, 23, 42, 0.08) !important;
}

html.light #figma-hero-section .hero-gradient-mask,
html.light #figma-hero-section .bg-gradient-to-r,
html.light #figma-hero-section .bg-gradient-to-t {
  opacity: 0.06 !important;
}

html.light #figma-hero-section h1,
html.light #figma-hero-section h2,
html.light #figma-hero-section #hero-slide-title,
html.light #figma-hero-section h1 span:not(.text-\[\#ff4655\]) {
  color: #0f172a !important;
  text-shadow: none !important;
}

html.light #figma-hero-section p,
html.light #figma-hero-section #hero-slide-desc,
html.light #figma-hero-section span.text-slate-300,
html.light #figma-hero-section span.text-slate-400 {
  color: #1e293b !important;
}

html.light #figma-hero-section #hero-slide-venue,
html.light #figma-hero-section #hero-slide-date {
  color: #0f172a !important;
}

html.light #figma-hero-section .bg-white\/10,
html.light #figma-hero-section .bg-slate-900\/80 {
  background-color: #ffffff !important;
  color: #0f172a !important;
  border-color: #94a3b8 !important;
  font-weight: 700 !important;
}

html.light #figma-hero-section .text-\[\#bbf444\],
html.light #organiza .text-\[\#bbf444\],
html.light [data-event-card] .text-\[\#bbf444\] {
  color: #15803d !important;
  background-color: rgba(22, 163, 74, 0.12) !important;
  border-color: rgba(22, 163, 74, 0.35) !important;
}

html.light #organiza {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%) !important;
  border-color: #cbd5e1 !important;
  box-shadow: 0 10px 30px -10px rgba(15, 23, 42, 0.06) !important;
}

html.light #organiza h2,
html.light #organiza h3,
html.light #organiza .text-white:not(a):not(button) {
  color: #0f172a !important;
}

html.light #organiza p,
html.light #organiza .text-slate-300,
html.light #organiza .text-slate-400 {
  color: #334155 !important;
}

html.light #organiza .bg-white\/5 {
  background-color: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
}

/* Global Light Mode high-contrast text overrides */
html.light .text-slate-400 {
  color: #475569 !important;
}

html.light .text-slate-500 {
  color: #334155 !important;
}

html.light .text-slate-300:not([class*="bg-[#ff4655]"]):not([class*="bg-emerald-"]):not([class*="bg-slate-900"]) {
  color: #1e293b !important;
}

html.light .text-\[\#00daf3\] {
  color: #0284c7 !important;
}

html.light .text-\[\#f59e0b\] {
  color: #b45309 !important;
}

html.light input,
html.light select,
html.light textarea {
  color: #0f172a !important;
}

html.light .row-label {
  fill: #1e293b !important;
  font-weight: 700 !important;
}

html.dark .row-label {
  fill: #94a3b8;
}

html.light #seat-map-container {
  background-color: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
}

html.light [data-event-card] {
  background-color: #ffffff !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 4px 16px -4px rgba(15, 23, 42, 0.05) !important;
}

html.light [data-event-card]:hover {
  border-color: #ff4655 !important;
  box-shadow: 0 12px 24px -6px rgba(255, 70, 85, 0.12) !important;
}

/* Force nav search input text visibility in both light and dark modes */
#header-nav-search-input,
#header-search-input,
#hero-spotlight-search-input {
  color: var(--nav-search-color, #ffffff) !important;
  -webkit-text-fill-color: var(--nav-search-color, #ffffff) !important;
  opacity: 1 !important;
}

#header-nav-search-input::placeholder,
#header-search-input::placeholder,
#hero-spotlight-search-input::placeholder {
  color: #94a3b8 !important;
  -webkit-text-fill-color: #94a3b8 !important;
  opacity: 1 !important;
}

/* --------------------------------------------------------------------------
   Interactive SVG Seat Nodes & Organizer Zones
   -------------------------------------------------------------------------- */
.seat-node {
  cursor: pointer;
  transition: transform 0.16s cubic-bezier(0.34, 1.56, 0.64, 1),
              fill 0.16s ease,
              stroke 0.16s ease,
              opacity 0.2s ease;
  transform-box: fill-box;
  transform-origin: center;
}

.seat-node:hover:not([data-status="SOLD"]):not([data-status="LOCKED"]) {
  transform: scale(1.26);
  filter: drop-shadow(0 0 8px rgba(16, 185, 129, 0.55));
}

/* Statuses */
.seat-node[data-status="AVAILABLE"] {
  fill: #10b981;
  stroke: #059669;
  stroke-width: 1.5px;
}

.seat-node[data-status="SELECTED"] {
  fill: #ff4655;
  stroke: #ffffff;
  stroke-width: 2px;
  filter: drop-shadow(0 0 10px rgba(255, 70, 85, 0.75));
  transform: scale(1.18);
}

.seat-node[data-status="LOCKED"] {
  fill: #f59e0b;
  stroke: #b45309;
  stroke-width: 1.5px;
  cursor: not-allowed;
  opacity: 0.75;
}

.seat-node[data-status="SOLD"] {
  fill: #475569;
  stroke: #334155;
  stroke-width: 1px;
  cursor: not-allowed;
  opacity: 0.45;
}

html.light .seat-node[data-status="SOLD"] {
  fill: #cbd5e1;
  stroke: #94a3b8;
  opacity: 0.65;
}

/* Filtered out seats */
.seat-node.seat-dimmed {
  opacity: 0.12 !important;
  pointer-events: none;
}

/* Organizer Custom SVG Zone Interactivity */
.organizer-svg-zone {
  cursor: pointer;
  transition: filter 0.2s ease, opacity 0.2s ease, stroke-width 0.2s ease;
}

.organizer-svg-zone:hover {
  filter: brightness(1.15) drop-shadow(0 4px 12px rgba(255, 70, 85, 0.35));
}

.organizer-svg-zone.zone-active-selected {
  stroke: #ffffff !important;
  stroke-width: 3.5px !important;
  filter: drop-shadow(0 0 14px rgba(255, 70, 85, 0.75));
}

html.light .organizer-svg-zone.zone-active-selected {
  stroke: #0f172a !important;
}

/* --------------------------------------------------------------------------
   Pan & Zoom Canvas Behaviour (Desktop & Mobile)
   -------------------------------------------------------------------------- */
#seat-map-container {
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

#venue-seat-map {
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

/* Stage Visual Pulse */
.stage-glow {
  filter: drop-shadow(0 0 16px rgba(99, 102, 241, 0.35));
}

/* --------------------------------------------------------------------------
   Animations: Anti-Fraud Laser Scan & Toast Transitions
   -------------------------------------------------------------------------- */
@keyframes laserScan {
  0% {
    top: 8px;
    opacity: 0.9;
  }
  50% {
    top: calc(100% - 12px);
    opacity: 1;
  }
  100% {
    top: 8px;
    opacity: 0.9;
  }
}

.animate-laser-scan {
  position: absolute;
  animation: laserScan 2.6s ease-in-out infinite;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fadeIn 0.22s ease-out forwards;
}

/* Perforated Ticket Stub Notches */
.ticket-notch-left,
.ticket-notch-right {
  position: absolute;
  top: 52%;
  width: 24px;
  height: 24px;
  border-radius: 9999px;
  background-color: #0f131d;
  z-index: 10;
}

html.light .ticket-notch-left,
html.light .ticket-notch-right {
  background-color: #ffffff;
}

.ticket-notch-left {
  left: -12px;
}

.ticket-notch-right {
  right: -12px;
}

/* Custom Scrollbar */
::-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);
}
