/* PuckPathway OS: Custom Theme & Glassmorphism Styles */

:root {
  --ice-bg: #090e17;
  --panel-bg: rgba(15, 23, 42, 0.85);
  --panel-border: rgba(56, 189, 248, 0.2);
  --ice-blue: #38bdf8;
  --goalie-gold: #f59e0b;
  --danger-red: #ef4444;
  --assist-green: #10b981;
}

/* Universal Resets: Eliminate raw browser default links and beveled buttons */
*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s ease, opacity 0.15s ease;
}

a:hover {
  text-decoration: none;
}

button {
  font-family: inherit;
  color: inherit;
  cursor: pointer;
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
  outline: none;
}

/* Resilient Layout Fallbacks (guarantees clean enterprise UI even if CDN is delayed or offline) */
.hidden { display: none !important; }
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }
.block { display: block; }
.inline-block { display: inline-block; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1 1 0%; }
.shrink-0 { flex-shrink: 0; }
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.sticky { position: sticky; }
.w-full { width: 100%; }
.max-w-7xl { max-width: 80rem; margin-left: auto; margin-right: auto; }

.text-white { color: #ffffff; }
.text-slate-100 { color: #f1f5f9; }
.text-slate-300 { color: #cbd5e1; }
.text-slate-400 { color: #94a3b8; }
.text-sky-300 { color: #7dd3fc; }
.text-sky-400 { color: #38bdf8; }
.text-emerald-300 { color: #6ee7b7; }
.text-emerald-400 { color: #34d399; }
.text-amber-300 { color: #fcd34d; }
.text-amber-400 { color: #fbbf24; }

.bg-slate-900 { background-color: #0f172a; }
.bg-slate-950 { background-color: #020617; }

body {
  background-color: #06090e;
  background-image: 
    radial-gradient(at 0% 0%, rgba(14, 165, 233, 0.12) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(99, 102, 241, 0.08) 0px, transparent 50%);
  color: #f1f5f9;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  overflow-x: hidden;
}

/* Glassmorphism containers */
.glass-panel {
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

.glass-panel-glow {
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(56, 189, 248, 0.3);
  box-shadow: 0 0 25px rgba(56, 189, 248, 0.15);
}

/* Hockey Rink Canvas Container */
.rink-canvas-container {
  background: #f8fafc;
  border-radius: 24px;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.15), 0 10px 30px rgba(0, 0, 0, 0.5);
  border: 4px solid #334155;
  position: relative;
  overflow: hidden;
}

/* Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.6);
}
::-webkit-scrollbar-thumb {
  background: rgba(56, 189, 248, 0.3);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(56, 189, 248, 0.6);
}

/* Hide scrollbar for clean mobile touch strips */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Glow badges */
.badge-ice {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.badge-gold {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-green {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-red {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Animations */
@keyframes pulse-border {
  0%, 100% { border-color: rgba(56, 189, 248, 0.4); }
  50% { border-color: rgba(56, 189, 248, 0.9); }
}

.animate-pulse-glow {
  animation: pulse-border 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Bench shift card active */
.bench-card-active {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(15, 23, 42, 0.9) 100%);
  border: 1px solid #10b981;
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.25);
}

.bench-card-warn {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.2) 0%, rgba(15, 23, 42, 0.9) 100%);
  border: 1px solid #ef4444;
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.25);
}


/* ==================== PRINT STYLES FOR COACH ICE CARD & SCOUT DOSSIER ==================== */
@media print {
  body {
    background: #ffffff !important;
    color: #0f172a !important;
  }
  header, #mainNavBar, footer, #roleContextHUD, #toastContainer, button:not(.no-print) {
    display: none !important;
  }
  #coachIceCardModal:not(.hidden), #scoutDossierModal:not(.hidden), #gameBoxScoreModal:not(.hidden) {
    position: static !important;
    display: block !important;
    background: transparent !important;
    backdrop-filter: none !important;
    padding: 0 !important;
    border: none !important;
  }
  #coachIceCardModal .glass-panel, #scoutDossierModal .glass-panel, #gameBoxScoreModal .glass-panel {
    background: #ffffff !important;
    color: #0f172a !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: none !important;
    max-width: 100% !important;
    max-height: none !important;
    padding: 10px !important;
  }
  .glass-panel {
    background: #ffffff !important;
    color: #0f172a !important;
    border-color: #cbd5e1 !important;
  }
  .print-card-box {
    border: 1px solid #cbd5e1 !important;
    background: #f8fafc !important;
    color: #0f172a !important;
  }
}


/* ==================== PATH — SCOUTING PROFILE EDITORIAL THEME ==================== */
.path-profile-container {
  --ice: #EFF3F2;
  --panel: #FFFFFF;
  --line: #C6CFCE;
  --ink: #1B2430;
  --ink-soft: #566370;
  --teal: #2E6E73;
  --teal-dk: #1E4C50;
  --amber: #C97A2B;
  --amber-bg: #FBEFDF;
  --green: #3F7A56;
  --green-bg: #E7F1EA;
  --red: #A6402E;
  --red-bg: #F6E7E3;
  font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--ink);
  background: var(--ice);
}

.path-profile-container h1, 
.path-profile-container h2, 
.path-profile-container h3, 
.path-profile-container .path-num,
.path-profile-container .stop-league,
.path-profile-container .elig-value {
  font-family: 'Zilla Slab', Georgia, serif;
}

.path-rail {
  background: #1E4C50;
  color: #E4EEED;
}

.path-wl-item {
  padding: 10px 16px;
  border-left: 3px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease;
}
.path-wl-item:hover { background: rgba(255,255,255,0.06); }
.path-wl-item.active {
  background: rgba(255,255,255,0.12);
  border-left-color: #C97A2B;
}

.path-wl-flag {
  display: inline-block;
  margin-top: 4px;
  font-size: 10.5px;
  padding: 2px 7px;
  border-radius: 2px;
  font-weight: 600;
}
.path-wl-flag.move { background: #C97A2B; color: #2B1B04; }
.path-wl-flag.watch { background: rgba(255,255,255,0.18); color: #D6E5E3; }
.path-wl-flag.free-agent { background: #3F7A56; color: #FFFFFF; }
.path-wl-flag.portal { background: #8B5CF6; color: #FFFFFF; }

.path-tag {
  font-size: 12px;
  font-weight: 600;
  padding: 5px 10px;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  background: var(--panel);
}
.path-tag.eligible { border-color: var(--green); color: var(--green); background: var(--green-bg); }
.path-tag.pro-fa { border-color: var(--amber); color: var(--amber); background: var(--amber-bg); }

.path-tab-btn {
  padding: 10px 4px;
  margin-right: 24px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-soft);
  cursor: pointer;
  border-bottom: 2px solid transparent;
}
.path-tab-btn.active { color: var(--ink); border-bottom-color: var(--amber); font-weight: 700; }

.path-stop {
  flex: 1;
  padding: 14px 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 4px solid var(--teal);
  position: relative;
}
.path-stop + .path-stop { margin-left: 14px; }
.path-stop.pending { border-left-color: var(--amber); background: var(--amber-bg); }

/* ==========================================================================
   Mobile-Friendly Menu, Bottom HUD & Touch Canvas Optimizations
   ========================================================================== */

/* Safe Area Insets for iOS & Modern Mobile Devices */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .safe-area-bottom {
    padding-bottom: calc(0.5rem + env(safe-area-inset-bottom)) !important;
  }
}
@supports (padding-top: env(safe-area-inset-top)) {
  .safe-area-top {
    padding-top: calc(0.5rem + env(safe-area-inset-top)) !important;
  }
}

/* Eliminate tap delay and unwanted highlight on mobile touch */
* {
  -webkit-tap-highlight-color: transparent;
}

/* Hide scrollbar utility for sleek touch scrolling rows */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Mobile Screen Layout Adjustments (< 1024px) */
@media (max-width: 1023px) {
  body {
    padding-bottom: 84px; /* Clearance for sticky bottom HUD */
    -webkit-overflow-scrolling: touch;
  }

  /* Prevent auto-zoom on iOS Safari when tapping inputs */
  input[type="text"],
  input[type="search"],
  input[type="number"],
  select,
  textarea {
    font-size: 16px !important;
  }

  /* Optimize touch canvases to prevent unwanted page gestures while drawing */
  .rink-canvas-container,
  #filmCanvasWrapper,
  #practiceRinkCanvas,
  #filmCanvas {
    touch-action: none !important;
    user-select: none;
    -webkit-user-select: none;
  }

  /* Ensure touch-friendly tap targets of at least 44x44px */
  .mobile-bottom-tab,
  #openMobileDrawerBottomBtn,
  #mobileMenuToggleBtn,
  .mobile-nav-btn,
  .channel-tab-btn,
  .film-tool-btn,
  .quick-team-pill {
    min-height: 44px;
    touch-action: manipulation;
  }

  /* Make tab contents flow comfortably on mobile */
  .tab-content {
    overflow-x: hidden;
  }

  /* Responsive video canvas container */
  #filmCanvasWrapper {
    width: 100% !important;
    max-width: 100vw;
  }
}

/* Slide-out Mobile Nav Drawer */
#mobileNavDrawer {
  transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

#mobileNavDrawer.hidden {
  display: none !important;
}

#mobileNavDrawer > div {
  transform: translateX(0);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Drag & Drop Highlight on Film Room Canvas */
#filmCanvasWrapper.drag-over {
  border-color: #38bdf8 !important;
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.35);
}


