/* ── CSS custom properties — overridden by JS from config.theme ────── */
:root {
  --primary-color: #000000;
  --accent-color:  #ffffff;
  --font-family:   Arial, sans-serif;
}

/* ── Reset & base ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  font-family: var(--font-family);
  margin: 0;
  padding: 0;
  background: #f5f5f5;
  color: #222;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Loading ──────────────────────────────────────────────────────── */
#loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  gap: 16px;
  color: #555;
  font-size: 1em;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #ddd;
  border-top-color: #333;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ── Error ────────────────────────────────────────────────────────── */
#error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  gap: 16px;
  text-align: center;
  padding: 20px;
  color: #555;
}

#error p { font-size: 1.05em; line-height: 1.5; }

#retry-btn {
  background: #000;
  color: #fff;
  border: none;
  padding: 10px 24px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1em;
  margin-top: 4px;
}

#retry-btn:hover { background: #333; }

/* ── Point picker ─────────────────────────────────────────────────── */
#point-picker {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 80vh;
  padding: 24px 20px;
  gap: 20px;
  background: #fff;
}

.picker-logo {
  max-width: 260px;
  width: 80%;
  display: block;
}

.picker-lang {
  display: flex;
  gap: 8px;
}

.picker-heading {
  font-size: 1.5em;
  text-align: center;
  border: none;
  padding: 0;
  margin: 0;
}

.picker-btn {
  display: block;
  background-color: #000;
  color: #fff;
  padding: 26px 40px;
  border-radius: 12px;
  text-decoration: none;
  text-align: center;
  width: 100%;
  max-width: 380px;
  font-size: 1.3em;
  font-weight: bold;
  box-shadow: 0 4px 12px rgba(0,0,0,0.18);
  transition: background-color 0.2s;
}

.picker-btn:hover { background-color: #333; }

/* ── Header ───────────────────────────────────────────────────────── */
#site-header {
  background-color: var(--primary-color);
  color: var(--accent-color);
  text-align: center;
  padding: 16px 20px 12px;
  width: 100%;
}

.header-container {
  max-width: 900px;
  margin: 0 auto;
}

.header-logo {
  max-width: 320px;
  width: 80%;
  display: block;
  margin: 0 auto 8px;
}

.header-venue-name {
  font-size: 2em;
  margin: 0 0 6px;
  color: var(--accent-color);
}

.header-tagline {
  font-size: 0.85em;
  opacity: 0.75;
  margin: 0 0 10px;
}

/* Language toggle */
.lang-nav {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 8px 0;
}

.lang-btn {
  background: none;
  color: var(--accent-color);
  border: 1px solid var(--accent-color);
  border-radius: 5px;
  padding: 4px 12px;
  font-size: 0.85em;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
  font-family: inherit;
}

.lang-btn.active,
.lang-btn:hover {
  background-color: var(--accent-color);
  color: var(--primary-color);
}

/* Current service point indicator */
.current-point {
  font-size: 0.8em;
  opacity: 0.8;
  margin: 6px 0 2px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.change-location-link {
  color: var(--accent-color);
  text-decoration: underline;
  opacity: 0.7;
}

.change-location-link:hover { opacity: 1; }

/* Social icons + wifi */
.header-social {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.header-social a,
.header-social .wifi-info {
  color: var(--accent-color);
  text-decoration: none;
  font-size: 1.3em;
}

.header-social .wifi-info {
  font-size: 0.85em;
  opacity: 0.8;
}

/* ── Nav wrapper + sticky category navbar ─────────────────────────── */
#nav-wrapper {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: var(--primary-color);
  min-height: 36px; /* keeps the toggle button visible when navbar is collapsed */
}

#navbar {
  overflow: hidden;
  max-height: 600px;
  opacity: 1;
  padding: 8px 48px 8px 8px; /* right pad keeps links from hiding behind toggle btn */
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
}

#navbar a {
  display: inline-block;
  color: var(--accent-color);
  border: 1px solid var(--accent-color);
  border-radius: 5px;
  padding: 4px 10px;
  margin: 3px 4px;
  text-decoration: none;
  font-size: 0.75em;
  white-space: nowrap;
  transition: background-color 0.15s;
}

#navbar a:hover {
  background-color: rgba(255, 255, 255, 0.15);
}

#navbar.collapsed {
  max-height: 0;
  opacity: 0;
  pointer-events: none;
  padding-top: 0;
  padding-bottom: 0;
}

#toggle-nav {
  position: absolute;
  right: 10px;
  top: 8px;
  background: none;
  border: none;
  color: var(--accent-color);
  font-size: 1.2em;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
  z-index: 1001;
  font-family: inherit;
}

/* ── Main menu content ────────────────────────────────────────────── */
#menu-content {
  flex: 1;
  background: #fff;
}

/* Optional top-of-menu note */
.menu-note {
  background: #fffde7;
  border-left: 4px solid #f9a825;
  margin: 16px 20px 0;
  padding: 12px 16px;
  border-radius: 4px;
  font-size: 0.9em;
  line-height: 1.4;
}

section {
  padding: 20px;
}

h2 {
  border-bottom: 2px solid #333;
  padding-bottom: 10px;
  margin-bottom: 16px;
  font-size: 1.1em;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

/* Sub-category headings — visually distinct from h2 */
.subcategory {
  margin-bottom: 24px;
}

.subcategory h3 {
  font-size: 0.85em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-left: 3px solid #555;
  padding-left: 8px;
  margin: 16px 0 10px;
  color: #444;
}

/* Individual dish card */
.dish {
  margin: 16px 0;
  padding-bottom: 14px;
  border-bottom: 1px solid #eee;
}

.dish:last-child {
  border-bottom: none;
}

.dish-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.dish-title {
  font-size: 1em;
  font-weight: bold;
  margin: 0;
  flex: 1;
  line-height: 1.3;
}

.price {
  font-weight: bold;
  font-size: 0.95em;
  white-space: nowrap;
  flex-shrink: 0;
}

.description {
  margin: 4px 0 0;
  font-size: 0.85em;
  color: #555;
  line-height: 1.4;
}

/* Tag badges */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}

.tag {
  display: inline-block;
  font-size: 0.7em;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 600;
}

.tag-vegetarian  { background: #e8f5e9; color: #2e7d32; }
.tag-vegan       { background: #e0f2f1; color: #00695c; }
.tag-gluten-free { background: #fff8e1; color: #e65100; }
.tag-spicy       { background: #fce4ec; color: #b71c1c; }
.tag-new         { background: #e3f2fd; color: #0d47a1; }
.tag-popular     { background: #fff3e0; color: #bf360c; }

/* ── Footer ───────────────────────────────────────────────────────── */
#site-footer {
  background-color: var(--primary-color);
  color: var(--accent-color);
  padding: 24px 20px;
  text-align: center;
  margin-top: auto;
}

.footer-section-title {
  font-size: 0.75em;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.6;
  margin: 0 0 10px;
  font-weight: 700;
  border: none;
  padding: 0;
}

/* Operating hours table */
.footer-hours {
  margin-bottom: 20px;
}

.hours-table {
  display: inline-table;
  border-collapse: collapse;
  font-size: 0.85em;
  text-align: left;
}

.hours-table td {
  padding: 3px 10px;
  opacity: 0.75;
}

.hours-table .hours-day {
  font-weight: 600;
  min-width: 100px;
  opacity: 0.85;
}

.hours-today td        { opacity: 1 !important; }
.hours-today .hours-day { font-weight: 700; }
.hours-today .hours-time { font-weight: 600; }

/* Contact */
.footer-contact {
  margin-bottom: 16px;
  font-size: 0.9em;
  line-height: 1.8;
}

.footer-link {
  color: var(--accent-color);
  text-decoration: none;
  opacity: 0.8;
}

.footer-link:hover { opacity: 1; text-decoration: underline; }

/* Footer social icons */
.footer-social {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin: 14px 0;
}

.footer-social a {
  color: var(--accent-color);
  text-decoration: none;
  font-size: 1.3em;
  opacity: 0.7;
  transition: opacity 0.15s;
}

.footer-social a:hover { opacity: 1; }

/* EU allergen disclaimer */
.allergen-disclaimer {
  font-size: 0.78em;
  opacity: 0.65;
  margin: 16px auto 0;
  max-width: 560px;
  line-height: 1.5;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  padding-top: 16px;
}

/* ── Responsive ───────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .header-logo { max-width: 220px; }
  section      { padding: 16px; }
  .menu-note   { margin: 12px 16px 0; }
}

@media (max-width: 480px) {
  .header-logo       { max-width: 180px; }
  .picker-btn        { padding: 22px 28px; font-size: 1.1em; }
  .hours-table .hours-day { min-width: 80px; }
  #navbar a          { font-size: 0.7em; padding: 3px 8px; margin: 2px 3px; }
}

@media (max-width: 320px) {
  .header-logo { max-width: 150px; }
}
