/* ==========================================================================
   CENTRAL 28 BEER CO. — SHARED WEBSITE THEME & NAVBAR
   Warm Craft-Taproom Palette, Sticky Navbar, Popover Drawer & Responsive Overrides
   ========================================================================== */

@media (prefers-reduced-motion: no-preference) {
  @view-transition {
    navigation: auto;
  }
}

:root {
  --bg-color: #0d0b09;
  --bg-gradient-start: #14100c;
  --bg-gradient-end: #090807;
  --accent-color: #f59e0b;
  --card-color: rgba(24, 20, 16, 0.9);
  --surface-elevated: rgba(34, 28, 22, 0.94);
  --border-subtle: rgba(255, 240, 215, 0.11);
  --text-primary: #faf6f0;
  --text-muted: #c2b8aa;
  --in-oklab: ;
}

@supports (background: linear-gradient(in oklab, white, black)) {
  :root {
    --in-oklab: in oklab;
  }
}

html,
body {
  width: 100%;
  height: auto !important;
  min-height: 100dvh;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  background-color: var(--bg-color) !important;
  background-image:
    radial-gradient(ellipse 90% 36% at 50% 0%, color-mix(in oklab, var(--accent-color) 18%, transparent), transparent 68%),
    radial-gradient(circle at 1px 1px, rgba(255, 240, 210, 0.04) 1px, transparent 0),
    linear-gradient(180deg, rgba(13, 11, 9, 0.94) 0%, rgba(9, 8, 7, 0.98) 100%) !important;
  background-size: auto, 24px 24px, auto !important;
  color: var(--text-primary);
  accent-color: var(--accent-color);
  user-select: text !important;
}

::selection {
  background: color-mix(in oklab, var(--accent-color) 38%, transparent);
  color: #ffffff;
}

/* Sticky Top Website Navbar */
.site-navbar {
  position: sticky;
  top: 0;
  z-index: 90;
  background: rgba(13, 11, 9, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid color-mix(in oklab, var(--accent-color) 28%, var(--border-subtle));
  padding-top: env(safe-area-inset-top);
  font-family: var(--font-body, 'Inter', sans-serif);
}

.navbar-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0.75rem max(1rem, env(safe-area-inset-right)) 0.75rem max(1rem, env(safe-area-inset-left));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-primary);
  min-width: 0;
}

.site-navbar .c28-badge {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--accent-color);
  background: #0d0b09;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Cinzel', serif;
  font-weight: 800;
  font-size: 1rem;
  color: #fff;
  flex-shrink: 0;
  overflow: hidden;
  filter: drop-shadow(0 0 10px color-mix(in oklab, var(--accent-color) 42%, transparent));
}

.nav-brand-name {
  font-family: var(--font-title, 'Oswald', sans-serif);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1.05;
  color: #ffffff;
}

.nav-brand-loc {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-color);
}

.nav-links-desktop {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-link {
  padding: 0.5rem 0.8rem;
  border-radius: 999px;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 600;
  transition: color 0.15s ease, background 0.15s ease;
}

.nav-link:hover {
  color: #fff;
  background: color-mix(in oklab, var(--accent-color) 14%, transparent);
}

.nav-link.is-active {
  background: var(--accent-color);
  color: #140f08;
  font-weight: 700;
}

.nav-dropdown-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.5rem 0.8rem;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}

.nav-dropdown-btn:hover {
  color: #fff;
  background: color-mix(in oklab, var(--accent-color) 14%, transparent);
}

.nav-dropdown-btn.is-active {
  background: var(--accent-color);
  color: #140f08;
  font-weight: 700;
}

.nav-dropdown-menu {
  position: fixed;
  margin: 0;
  min-width: 210px;
  padding: 0.45rem;
  border-radius: 14px;
  border: 1px solid color-mix(in oklab, var(--accent-color) 38%, var(--border-subtle));
  background: rgba(20, 16, 13, 0.98);
  backdrop-filter: blur(16px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.65);
  z-index: 9999;
}

.nav-dropdown-menu:is(:popover-open, .\:popover-open) {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.nav-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  text-decoration: none;
  color: var(--text-primary);
  font-size: 0.875rem;
  font-weight: 600;
}

.nav-dropdown-item:hover,
.nav-dropdown-item.is-active {
  background: color-mix(in oklab, var(--accent-color) 16%, transparent);
  color: #fff;
}

.mobile-menu-btn {
  display: none;
  align-items: center;
  gap: 0.45rem;
  min-block-size: 2.5rem;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  background: color-mix(in oklab, var(--accent-color) 14%, rgba(255, 255, 255, 0.05));
  border: 1px solid color-mix(in oklab, var(--accent-color) 42%, transparent);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
}

@media (max-width: 860px) {
  .nav-links-desktop {
    display: none;
  }
  .mobile-menu-btn {
    display: inline-flex;
  }
}

/* Native Popover Mobile Drawer */
.mobile-drawer {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(320px, 86vw);
  height: 100dvh;
  margin: 0;
  border: none;
  border-left: 1px solid color-mix(in oklab, var(--accent-color) 38%, var(--border-subtle));
  background: rgba(18, 15, 12, 0.98);
  color: var(--text-primary);
  padding: max(1.25rem, env(safe-area-inset-top)) 1.1rem max(1.5rem, env(safe-area-inset-bottom));
  box-shadow: -16px 0 48px rgba(0, 0, 0, 0.75);
  opacity: 0;
  transition-property: opacity, transform, display, overlay;
  transition-duration: 0.25s;
  transition-timing-function: ease-out;
  transition-behavior: allow-discrete;
  z-index: 9999;
}

@media (prefers-reduced-motion: no-preference) {
  .mobile-drawer {
    transform: translateX(100%);
  }
}

.mobile-drawer:is(:popover-open, .\:popover-open) {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  opacity: 1;
  @starting-style {
    opacity: 0;
  }
  @media (prefers-reduced-motion: no-preference) {
    transform: translateX(0);
    @starting-style {
      transform: translateX(100%);
    }
  }
}

.mobile-drawer::backdrop {
  background-color: rgba(0, 0, 0, 0);
  transition-property: background-color, display, overlay;
  transition-duration: 0.25s;
  transition-timing-function: ease-out;
  transition-behavior: allow-discrete;
}

.mobile-drawer:is(:popover-open, .\:popover-open)::backdrop {
  background-color: rgba(0, 0, 0, 0.65);
  @starting-style {
    background-color: rgba(0, 0, 0, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .mobile-drawer,
  .mobile-drawer::backdrop {
    transition-duration: 0.1s;
  }
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
}

.drawer-title {
  font-family: var(--font-title, 'Oswald', sans-serif);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-color);
}

.drawer-close {
  min-block-size: 2.25rem;
  min-inline-size: 2.25rem;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  font-size: 1rem;
  cursor: pointer;
}

.drawer-links {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  overflow-y: auto;
}

.drawer-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-block-size: 2.85rem;
  padding: 0.6rem 0.85rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
}

.drawer-link:hover,
.drawer-link.is-active {
  border-color: var(--accent-color);
  background: color-mix(in oklab, var(--accent-color) 16%, transparent);
}

/* Website Shell Overrides for Legacy 16:9 Pages (calendar, events, vendor, gallery, videos) */
body.c28-has-navbar .kiosk-header,
body.c28-has-navbar #c28-floating-nav {
  display: none !important;
}

body.c28-has-navbar .signage-container {
  width: 100% !important;
  height: auto !important;
  min-height: calc(100dvh - 70px);
  overflow: visible !important;
}

body.c28-has-navbar .bg-overlay {
  display: none !important;
}

body.c28-has-navbar .signage-content {
  width: 100% !important;
  max-width: 1180px;
  margin: 0 auto;
  height: auto !important;
  min-height: calc(100dvh - 70px);
  padding: 1.5rem max(1rem, env(safe-area-inset-right)) max(2.5rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left)) !important;
  display: flex !important;
  flex-direction: column;
  gap: 1.25rem !important;
  overflow: visible !important;
}

body.c28-has-navbar .calendar-stage,
body.c28-has-navbar .events-stage,
body.c28-has-navbar .vendor-stage,
body.c28-has-navbar .gallery-stage,
body.c28-has-navbar .video-stage {
  height: auto !important;
  overflow: visible !important;
  flex: 1 0 auto;
}

body.c28-has-navbar .calendar-day-card,
body.c28-has-navbar .event-notice-card,
body.c28-has-navbar .vendor-card-shell,
body.c28-has-navbar .specials-box-horizontal {
  background: var(--card-color) !important;
  border-color: var(--border-subtle) !important;
  border-radius: 18px !important;
  box-shadow:
    0 2px 6px rgba(0, 0, 0, 0.28),
    0 12px 28px rgba(0, 0, 0, 0.42) !important;
}

body.c28-has-navbar .bottom-specials-section {
  height: auto !important;
}

body.c28-has-navbar .specials-box-horizontal {
  height: auto !important;
  padding: 0.9rem 1.15rem !important;
}

/* Sub-toolbar adjustment for standalone pages (photos, clips, wheel) */
body.c28-has-navbar .photos-topbar,
body.c28-has-navbar .clips-topbar,
body.c28-has-navbar .wheel-topbar {
  position: static !important;
  max-width: 1180px;
  margin: 1rem auto 0;
  border-radius: 16px;
  border: 1px solid var(--border-subtle);
  background: var(--card-color) !important;
}

body.c28-has-navbar .photos-topbar .brand-left,
body.c28-has-navbar .clips-topbar .brand-left,
body.c28-has-navbar .wheel-topbar .brand-left {
  display: none;
}

@media print {
  .site-navbar,
  .mobile-drawer {
    display: none !important;
  }
}
