/*
 * Narayanam design tokens — ported unchanged from src/styles.css
 * Tailwind utilities are generated at runtime by @tailwindcss/browser@4.
 */

:root {
  --radius: 0.5rem;
  --background: oklch(0.98 0.012 95);
  --foreground: oklch(0.26 0.045 155);
  --card: oklch(1 0 0);
  --card-foreground: oklch(0.26 0.045 155);
  --popover: oklch(1 0 0);
  --popover-foreground: oklch(0.26 0.045 155);
  --primary: oklch(0.34 0.062 158);
  --primary-foreground: oklch(0.98 0.012 95);
  --secondary: oklch(0.95 0.02 96);
  --secondary-foreground: oklch(0.32 0.06 158);
  --muted: oklch(0.95 0.015 96);
  --muted-foreground: oklch(0.48 0.03 150);
  --accent: oklch(0.72 0.12 85);
  --accent-foreground: oklch(0.24 0.05 158);
  --gold: oklch(0.74 0.125 84);
  --gold-soft: oklch(0.87 0.07 88);
  --cream: oklch(0.96 0.02 92);
  --destructive: oklch(0.55 0.2 27);
  --destructive-foreground: oklch(0.98 0.01 95);
  --border: oklch(0.89 0.02 92);
  --input: oklch(0.89 0.02 92);
  --ring: oklch(0.74 0.125 84);
  --chart-1: oklch(0.34 0.062 158);
  --chart-2: oklch(0.74 0.125 84);
  --chart-3: oklch(0.6 0.11 60);
  --chart-4: oklch(0.5 0.08 158);
  --chart-5: oklch(0.8 0.06 90);
  --sidebar: oklch(0.34 0.062 158);
  --sidebar-foreground: oklch(0.98 0.012 95);
  --sidebar-primary: oklch(0.74 0.125 84);
  --sidebar-primary-foreground: oklch(0.24 0.05 158);
  --sidebar-accent: oklch(0.4 0.06 158);
  --sidebar-accent-foreground: oklch(0.98 0.012 95);
  --sidebar-border: oklch(0.4 0.06 158);
  --sidebar-ring: oklch(0.74 0.125 84);
  --color-background: var(--background);
  --color-foreground: var(--foreground);
  --color-muted: var(--muted);
  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-sans: "Karla", ui-sans-serif, system-ui, sans-serif;
}

.dark {
  --background: oklch(0.2 0.04 158);
  --foreground: oklch(0.96 0.015 95);
  --card: oklch(0.26 0.045 158);
  --card-foreground: oklch(0.96 0.015 95);
  --popover: oklch(0.26 0.045 158);
  --popover-foreground: oklch(0.96 0.015 95);
  --primary: oklch(0.74 0.125 84);
  --primary-foreground: oklch(0.2 0.04 158);
  --secondary: oklch(0.3 0.05 158);
  --secondary-foreground: oklch(0.96 0.015 95);
  --muted: oklch(0.3 0.05 158);
  --muted-foreground: oklch(0.78 0.03 95);
  --accent: oklch(0.74 0.125 84);
  --accent-foreground: oklch(0.2 0.04 158);
  --gold: oklch(0.78 0.13 84);
  --gold-soft: oklch(0.85 0.08 88);
  --cream: oklch(0.3 0.05 158);
  --destructive: oklch(0.65 0.19 25);
  --destructive-foreground: oklch(0.96 0.015 95);
  --border: oklch(1 0 0 / 14%);
  --input: oklch(1 0 0 / 18%);
  --ring: oklch(0.78 0.13 84);
  --sidebar: oklch(0.24 0.045 158);
  --sidebar-foreground: oklch(0.96 0.015 95);
  --sidebar-primary: oklch(0.78 0.13 84);
  --sidebar-primary-foreground: oklch(0.2 0.04 158);
  --sidebar-accent: oklch(0.3 0.05 158);
  --sidebar-accent-foreground: oklch(0.96 0.015 95);
  --sidebar-border: oklch(1 0 0 / 14%);
  --sidebar-ring: oklch(0.78 0.13 84);
}

*,
*::before,
*::after {
  border-color: var(--border);
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  letter-spacing: -0.01em;
}

input, select, textarea {
  font-size: 16px;
}

button, a, [role="button"] {
  -webkit-touch-callout: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

.gold-rule {
  background-image: linear-gradient(
    to right,
    transparent,
    color-mix(in oklab, var(--gold) 80%, transparent),
    transparent
  );
  height: 1px;
}

.plaque {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid color-mix(in oklab, var(--gold) 70%, transparent);
  border-radius: 9999px;
  padding: 0.35rem 1.5rem;
  font-family: var(--font-display);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.no-scrollbar {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.no-scrollbar::-webkit-scrollbar { display: none; }

.page-enter {
  animation: page-fade 0.32s ease-out both;
}

@keyframes page-fade {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

@keyframes shimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

@keyframes enter-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes enter-bottom {
  from { transform: translateY(1rem); opacity: 0; }
  to { transform: none; opacity: 1; }
}
@keyframes enter-bottom-full {
  from { transform: translateY(100%); }
  to { transform: none; }
}
@keyframes enter-right {
  from { transform: translateX(100%); }
  to { transform: none; }
}

.animate-in.fade-in { animation: enter-fade 0.2s ease-out both; }
.animate-in.slide-in-from-bottom { animation: enter-bottom-full 0.3s ease-out both; }
.animate-in.slide-in-from-bottom-4 { animation: enter-bottom 0.35s ease-out both; }

@media (min-width: 1024px) {
  .lg\:slide-in-from-right { animation: enter-right 0.3s ease-out both; }
}

.toast-item {
  pointer-events: auto;
  border-radius: 0.75rem;
  background: var(--card);
  color: var(--foreground);
  box-shadow: 0 10px 30px rgb(0 0 0 / 12%);
  border: 1px solid color-mix(in oklab, var(--gold) 35%, transparent);
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  animation: page-fade 0.25s ease-out both;
}

$spinner {
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ---- Mobile bottom tab bar (app-style) ---- */
.bottom-tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  border-top: 1px solid var(--border);
  background: color-mix(in oklab, var(--background) 95%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding-bottom: env(safe-area-inset-bottom);
}

@media (min-width: 1024px) {
  .bottom-tabbar {
    display: none;
  }
}

.bottom-tabbar ul {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  max-width: 28rem;
  margin: 0 auto;
  list-style: none;
  padding: 0;
}

.bottom-tabbar a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 56px;
  padding: 8px 0;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted-foreground);
  text-decoration: none;
  transition: color 0.2s ease, transform 0.12s ease;
}

.bottom-tabbar a:active {
  transform: scale(0.95);
}

.bottom-tabbar a.is-active,
.bottom-tabbar a[aria-current="page"] {
  color: #1e4b3a;
  color: var(--primary);
}

.bottom-tabbar__icon-wrap {
  position: relative;
  display: inline-flex;
}

.bottom-tabbar__icon {
  width: 20px;
  height: 20px;
  width: 1.25rem;
  height: 1.25rem;
  stroke-width: 2;
  color: currentColor;
}

.bottom-tabbar .badge {
  position: absolute;
  top: -8px;
  right: -10px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 9999px;
  background: #c9a227;
  color: #1e4b3a;
  font-size: 10px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}

@media (max-width: 1023px) {
  body.has-tabbar {
    padding-bottom: calc(64px + env(safe-area-inset-bottom));
  }

  #floating-cart-bar {
    bottom: calc(72px + env(safe-area-inset-bottom));
  }

  #floating-actions {
    bottom: calc(76px + env(safe-area-inset-bottom));
  }

  #floating-actions.is-raised {
    bottom: calc(132px + env(safe-area-inset-bottom));
  }
}
