@import url("https://fonts.googleapis.com/css2?family=Barlow:wght@600;700&display=swap");

:root {
  --bg: #151311;
  --bg-top: #1b1815;
  --bg-wash: var(--bg);
  --ink: #141313;
  --muted: #7a5f34;
  --card: #ffffff;
  --line: #e0dad1;
  --green: #ad8339;
  --green-dark: #141313;
  --accent: #ad8339;
  --cream: #f7f3eb;
  --charcoal: #1f1f1f;
  --charcoal-border: #3a3a3a;
  --safe-area-top: env(safe-area-inset-top);
  --safe-area-right: env(safe-area-inset-right);
  --safe-area-bottom: env(safe-area-inset-bottom);
  --safe-area-left: env(safe-area-inset-left);
}

html {
  background: var(--bg-wash);
  -webkit-text-size-adjust: 100%;
  -webkit-text-size-adjust: none;
  text-size-adjust: 100%;
}

html,
body,
#app,
#spa-root {
  background: var(--bg) !important;
  background-color: var(--bg) !important;
  background-image: none !important;
  min-height: 100%;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  touch-action: manipulation;
}

.is-hidden {
  display: none !important;
}

body {
  margin: 0;
  font-family: "Barlow", "Segoe UI", sans-serif;
  background: var(--bg-wash);
  background-color: var(--bg);
  opacity: 1;
  transition: opacity 160ms ease;
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
  padding: var(--safe-area-top) var(--safe-area-right) var(--safe-area-bottom) var(--safe-area-left);
  background-clip: border-box;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: -2;
}

body.spa-loading {
  opacity: 1;
  pointer-events: none;
}

button,
.event-button,
.cta,
.ghost-button,
.admin-reveal-toggle {
  text-transform: capitalize;
  min-height: 44px;
}

a[href^="mailto:"] {
  text-transform: none;
}

a,
button {
  -webkit-tap-highlight-color: transparent;
}

h1,
h2,
h3 {
  line-height: 1.2;
}

body .card {
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.14);
}

button:active,
.event-button:active,
.cta:active,
.ghost-button:active,
.admin-reveal-toggle:active {
  transform: translateY(1px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.12);
}

.pull-indicator {
  position: fixed;
  top: 10px;
  left: 0;
  right: 0;
  margin: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid rgba(173, 131, 57, 0.3);
  border-top-color: var(--green);
  background: transparent;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
  z-index: 40;
}

.pull-indicator.is-visible {
  opacity: 1;
  transform: translateY(0);
  animation: pull-spin 0.8s linear infinite;
}

.pull-indicator.is-hidden {
  opacity: 0;
  transform: translateY(-6px);
  animation: none;
}

@keyframes pull-spin {
  to { transform: translateY(0) rotate(360deg); }
}


.pressable {
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  will-change: transform;
}

.pressable:active {
  transform: scale(0.98);
}

.pressable:focus-visible {
  outline: 2px solid rgba(173, 131, 57, 0.45);
  outline-offset: 2px;
}

.footer-timestamp {
  display: none;
}

@media (max-width: 520px) {
  body {
    padding-top: 0;
    padding-right: calc(var(--safe-area-right) + 6px);
    padding-bottom: calc(var(--safe-area-bottom) + 6px);
    padding-left: calc(var(--safe-area-left) + 6px);
  }

  body .page {
    padding-left: 18px;
    padding-right: 18px;
  }
}


/* Remove static button shadows across the site. */
button,
.btn,
.cta,
.event-button,
.cart-pill,
.basket-fab,
.menu-toggle,
.pill,
.tab {
  box-shadow: none !important;
}


/* Keep button visuals contained within the pill. */
.cta,
.event-button,
.btn,
.cart-pill,
.basket-fab,
.menu-toggle,
.pill,
.tab {
  overflow: hidden;
}


/* Normalize CTA buttons to match the "Back to Home" style site-wide. */
.cta,
.event-button,
.btn.primary,
.btn.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid rgba(105, 72, 22, 0.65);
  background: linear-gradient(180deg, #d8b06b 0%, #b98335 55%, #9c6a2a 100%);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.02em;
  text-decoration: none;
}


/* Force CTA styles to override later styles in page-specific CSS. */
.cta,
.event-button,
.btn.primary,
.btn.cta {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 44px !important;
  padding: 0 18px !important;
  border-radius: 999px !important;
  border: 1px solid rgba(105, 72, 22, 0.65) !important;
  background: linear-gradient(180deg, #d8b06b 0%, #b98335 55%, #9c6a2a 100%) !important;
  color: #fff !important;
  font-weight: 700 !important;
  font-size: 13px !important;
  letter-spacing: 0.02em !important;
  text-decoration: none !important;
}


html, body {
  height: 100%;
}


#app {
  height: 100vh;
  overflow: hidden;
}


/* iOS-style page transitions for SPA navigation */
#app {
  position: relative;
  overflow: hidden;
}

#app .spa-page {
  position: relative;
  will-change: transform, opacity;
}

#app .spa-enter,
#app .spa-exit {
  position: absolute;
  inset: 0;
  transform: none;
  opacity: 1;
}

#app .spa-enter-active,
#app .spa-exit-active {
  position: absolute;
  inset: 0;
  transform: none;
  opacity: 1;
  transition: none;
}

#app.spa-fade .spa-enter {
  opacity: 0;
}

#app.spa-fade .spa-enter-active {
  opacity: 1;
  transition: opacity 0.18s ease !important;
}

#app.spa-fade .spa-exit {
  opacity: 1;
}

#app.spa-fade .spa-exit-active {
  opacity: 0;
  transition: opacity 0.18s ease !important;
}

#app.spa-fade .spa-enter {
  transform: none;
  opacity: 0;
}

#app.spa-fade .spa-enter-active {
  transform: none;
  opacity: 1;
  transition: opacity 0.22s ease !important;
}

#app.spa-fade .spa-exit {
  transform: none;
  opacity: 1;
}

#app.spa-fade .spa-exit-active {
  transform: none;
  opacity: 0;
  transition: opacity 0.22s ease !important;
}

/* Swipe-back gesture styles */
#spa-root.spa-swipe-active .spa-page {
  transition: none !important;
}

#spa-root.spa-swipe-active {
  overflow: hidden;
}


:root {
  --tab-bar-height: 64px;
  --tab-bar-touch-padding: 41px;
  --tab-bar-extra-padding: 9px;
}

.tab-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--tab-bar-height);
  padding: 8px 16px calc(var(--tab-bar-touch-padding) + var(--tab-bar-extra-padding) + env(safe-area-inset-bottom));
  background: #12100e;
  opacity: 1;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  z-index: 9999;
  backdrop-filter: none;
  transition: transform 0.22s ease;
  transform: translateY(0);
  pointer-events: auto;
  touch-action: manipulation;
}

.tab-bar::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: auto;
  background: transparent;
}

.tab-bar > * {
  position: relative;
  z-index: 1;
}

.tab-bar.is-hidden {
  transform: translateY(110%);
}

.tab-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 6px 8px;
  background: transparent;
  border: none;
  cursor: pointer;
}


.tab-item.is-active {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

#tab-more-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 210;
}

#tab-more-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

#tab-more-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  transform: translateY(100%);
  transition: transform 0.25s ease;
  z-index: 215;
  padding: 0 12px calc(var(--tab-bar-height) + 12px + env(safe-area-inset-bottom));
  pointer-events: none;
}

#tab-more-sheet.is-open {
  transform: translateY(0);
  pointer-events: auto;
}

body.tab-more-open {
  overflow: hidden;
}

body.tab-more-open #spa-root {
  pointer-events: none; /* Prevent background interactions while sheet is open. */
  overflow: hidden; /* Lock background while sheet is open. */
}

body.tab-more-open .tab-bar {
  pointer-events: auto;
}

body.tab-more-open .tab-bar .tab-item {
  pointer-events: auto;
}

body.tab-more-open #tab-more-backdrop,
body.tab-more-open #tab-more-sheet {
  pointer-events: auto;
}

.tab-more-panel {
  background: rgba(18, 16, 14, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 -18px 40px rgba(0, 0, 0, 0.4);

  height: auto;
  max-height: none;
  overflow: visible;
}

.tab-more-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 12px;
}

.tab-more-close {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  border-radius: 999px;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
}

.tab-more-links {
  display: grid;
  gap: 10px;
  padding-bottom: 8px;
  touch-action: manipulation;
  overscroll-behavior: auto;
}
body.tab-more-open #app {
  overflow: hidden !important; /* Lock app shell when sheet is open. */
}
.tab-more-link {
  text-decoration: none;
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.04);
}

#spa-loader {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: env(safe-area-inset-top) 16px calc(var(--tab-bar-height, 64px) + env(safe-area-inset-bottom) + 16px);
  background: rgba(12, 12, 12, 0.45);
  backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 220;
}

#spa-loader.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.spa-loader-card {
  display: grid;
  gap: 8px;
  place-items: center;
  padding: 16px 20px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(18, 18, 18, 0.92);
  color: #fff;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}

.spa-loader-text {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.8);
}

.spa-loader-spinner {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: #fff;
  animation: spa-spin 0.8s linear infinite;
}

.spa-loader-toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--tab-bar-height, 64px) + env(safe-area-inset-bottom) + 16px);
  transform: translate(-50%, 8px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.2s ease, opacity 0.2s ease;
  background: rgba(20, 20, 20, 0.9);
  color: #fff;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-align: center;
  max-width: 80%;
}

.spa-loader-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.acknowledge-flash {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at center, rgba(255, 230, 150, 0.35), rgba(255, 160, 10, 0.1));
  opacity: 0;
  mix-blend-mode: screen;
  transition: opacity 0.18s ease;
  z-index: 400;
}

.acknowledge-flash.is-visible {
  opacity: 1;
}

@keyframes spa-spin {
  to { transform: rotate(360deg); }
}

#spa-keepalive {
  display: none !important;
  pointer-events: none !important;
}

#spa-keepalive * {
  pointer-events: none !important;
}


/* Scroll container consolidation (single vertical scroll: #spa-root). */
html, body {
  height: 100%;
  overscroll-behavior-y: none;
  background: #151311;
}

body {
  margin: 0;
  overflow: hidden; /* Prevent body scroll; delegate to #spa-root. */
}

body.allow-body-scroll {
  overflow: auto;
}

#app {
  height: 100vh;
  overflow: hidden; /* Keep SPA shell fixed. */
  background: #151311;
  padding-bottom: calc(var(--tab-bar-height, 64px) + env(safe-area-inset-bottom));
}

body.allow-body-scroll #app {
  height: auto;
  overflow: visible;
}

#spa-root {
  height: 100%;
  min-height: 100vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: none;
  background: #151311;
  padding-bottom: calc(var(--tab-bar-height, 64px) + env(safe-area-inset-bottom));
  contain: layout paint;
  overflow-anchor: none;
  position: relative;
  z-index: 0;
}

body.allow-body-scroll #spa-root {
  height: auto;
  overflow: visible;
}

#spa-root.is-transitioning {
  overflow: hidden;
}

.tab-bar {
  padding-bottom: calc(var(--tab-bar-touch-padding) + var(--tab-bar-extra-padding) + env(safe-area-inset-bottom));
}

* {
  -webkit-tap-highlight-color: transparent;
}


/* Hide legacy footer nav links inside the SPA container */
#app .page_footer,
#app .page-footer,
#app .footer,
#app footer,
#app .footer-nav,
#app nav[aria-label="Footer"],
#app nav[aria-label*="footer" i],
#app nav a[href="/public/home"],
#app nav a[href="/public/events"],
#app nav a[href="/public/bookings"],
#app nav a[href="/public/shop"],
#app nav a[href="/public/contact"] {
  display: none !important;
}

body.spa-freeze *,
body.spa-freeze *::before,
body.spa-freeze *::after {
  transition: none !important;
}
