/* =========================================================
   base.css
   Global design system & layout
========================================================= */

:root {
  /* Brand */
  --brand-brown: #8B4513;

  /* Neutrals */
  --color-bg: #f6f6f7;
  --color-card: #ffffff;
  --color-text: #1a1a1a;
  --color-muted: #6b6b6b;
  --color-border: #e5e5ea;

  /* Shadows */
  --shadow-soft: 0 10px 30px rgba(0,0,0,0.08);
  --shadow-medium: 0 20px 60px rgba(0,0,0,0.16);

  /* Radius */
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;

  /* Spacing */
  --space-xs: 6px;
  --space-sm: 10px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 36px;
}

/* =========================================================
   BODY & TYPOGRAPHY
========================================================= */

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI",
               Roboto, system-ui, sans-serif;
  background: linear-gradient(180deg, #f2f2f7, #ffffff);
  color: var(--color-text);
  font-size: 15px;
}

/* =========================================================
   GLOBAL SAFETY — Prevent horizontal scroll
========================================================= */
html,
body {
  width: 100%;
  overflow-x: hidden;
}

/* Headings */
h1 {
  font-size: 32px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 20px;
  font-weight: 800;
}

h3 {
  font-size: 16px;
  font-weight: 700;
}

/* Text helpers */
.text-muted {
  color: var(--color-muted);
  font-size: 13px;
  line-height: 1.5;
}

/* =========================================================
   LAYOUT
========================================================= */

.container {
  max-width: 920px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.card {
  background: var(--color-card);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  box-shadow: var(--shadow-medium);
}

/* =========================================================
   HEADER & FOOTER
========================================================= */

header {
  background: #ffffff;
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  max-width: 1100px;
  margin: auto;
  padding: var(--space-md) var(--space-lg);
  display: flex;
  align-items: center;
}

/* =========================================================
   MOBILE HEADER CLEANUP
========================================================= */
@media (max-width: 768px) {
  .header-inner {
    justify-content: center;
  }

  /* Hide tagline text next to logo */
  .brand small {
    display: none;
  }

  /* Hide status pills on mobile */
  .status-pills {
    display: none;
  }
}

header img {
  height: 44px;
  cursor: pointer;
}

footer {
  background: #ffffff;
  border-top: 1px solid var(--color-border);
}

.footer-inner {
  max-width: 1100px;
  margin: auto;
  padding: var(--space-lg);
  text-align: center;
  font-size: 13px;
  color: var(--color-muted);
}

.footer-inner strong {
  color: #111;
}

/* =========================================================
   MOBILE HEADER ADAPTATION
========================================================= */
@media (max-width: 768px) {

  /* Header layout: keep it compact */
  .header-inner {
    justify-content: space-between;
    gap: 8px;
  }

  /* Hide business name + tagline next to logo */
  .brand div {
    display: none;
  }

  /* Hide non-essential pills */
  #liveDate,
  #liveTime,
  #weather {
    display: none;
  }

  /* Keep Open / Closed visible */
  .status-pills {
    gap: 6px;
  }
}

/* =========================================================
   MOBILE FOOTER ADAPTATION
========================================================= */
@media (max-width: 768px) {

  footer div[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
    gap: 24px;
  }
}

/* =========================================================
   BUTTONS
========================================================= */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  font-weight: 800;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.button-primary {
  background: var(--brand-brown);
  color: #ffffff;
}

.button-primary:hover {
  background: #7a3c10;
}

.button-outline {
  background: #ffffff;
  color: var(--brand-brown);
  border: 2px solid var(--brand-brown);
}

.button-outline:hover {
  background: rgba(139,69,19,0.05);
}

/* =========================================================
   MODAL / OVERLAY (Mobile-safe)
   Fixes iOS & iPad scrolling
========================================================= */

.modal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  width: 100vw;
  height: 100%;
  background: rgba(0,0,0,.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  padding: 20px;
  box-sizing: border-box;
}

.modal-card {
  background: #ffffff;
  width: 100%;
  max-width: 480px !important;
  border-radius: var(--radius-lg);
  padding: 28px 24px 32px;
  box-shadow: 0 24px 80px rgba(0,0,0,.25);
  box-sizing: border-box;
  max-height: 90vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* Mobile: bottom-sheet style — rises from bottom, thumb-friendly */
@media (max-width: 600px) {
  .modal {
    align-items: flex-end;
    padding: 0;
  }

  .modal-card {
    max-width: 100% !important;
    width: 100%;
    border-radius: 22px 22px 0 0;
    max-height: 92vh;
    padding: 24px 20px 48px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* =========================================================
   FOOTER MOBILE FIX (no horizontal scroll)
========================================================= */
@media (max-width: 768px) {
  footer div[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }

  footer {
    overflow-x: hidden;
  }
}