/*
Theme Name: OnlineMenu Restaurant
Theme URI: https://onlinemenu.se/
Author: OnlineMenu
Author URI: https://onlinemenu.se/
Description: A fast, reusable, mobile-first restaurant theme for the OnlineMenu Menu plugin (PriceListo also supported).
Version: 1.3.2
Requires at least: 6.2
Tested up to: 6.8
Requires PHP: 7.4
Text Domain: onlinemenu-restaurant
*/

:root {
  --om-primary: #761b23;
  --om-accent: #b68a3a;
  --om-ink: #241e1c;
  --om-muted: #6f6661;
  --om-paper: #fffaf3;
  --om-card: #ffffff;
  --om-line: rgba(36, 30, 28, 0.12);
  --om-radius: 18px;
  --om-shadow: 0 12px 36px rgba(45, 24, 18, 0.08);
  --om-width: 1180px;
  --om-body-font: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --om-heading-font: Georgia, "Times New Roman", serif;
  --om-font-scale: 1;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--om-paper);
  color: var(--om-ink);
  font-family: var(--om-body-font);
  font-size: calc(16px * var(--om-font-scale));
  line-height: 1.6;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.screen-reader-text:focus {
  position: fixed;
  z-index: 100000;
  top: 12px;
  left: 12px;
  width: auto;
  height: auto;
  clip: auto;
  padding: 12px 18px;
  background: #fff;
  color: #000;
}
.om-container { width: min(calc(100% - 32px), var(--om-width)); margin-inline: auto; }
.om-site-header {
  position: sticky;
  z-index: 100;
  top: 0;
  border-bottom: 1px solid var(--om-line);
  background: rgba(255, 250, 243, 0.94);
  backdrop-filter: blur(14px);
}
.om-header-inner {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.om-brand { display: inline-flex; align-items: center; gap: 13px; min-width: 0; }
.om-brand .custom-logo-link { display: inline-flex; flex: 0 0 auto; }
.om-brand .custom-logo { width: auto; max-height: 52px; }
.om-brand-name { overflow: hidden; color: var(--om-primary); font-family: var(--om-heading-font); font-size: clamp(1.1rem, 2.4vw, 1.55rem); font-weight: 700; letter-spacing: .025em; line-height: 1.1; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
.om-nav ul { display: flex; align-items: center; gap: 8px; margin: 0; padding: 0; list-style: none; }
.om-nav a { display: block; padding: 10px 16px; border-radius: 999px; font-weight: 650; text-decoration: none; }
.om-nav a:hover,
.om-nav .current-menu-item > a,
.om-nav .current_page_item > a { background: var(--om-primary); color: #fff; }
.om-menu-toggle { display: none; border: 0; background: transparent; color: var(--om-ink); font-size: 1.6rem; cursor: pointer; }
.om-hero {
  position: relative;
  min-height: clamp(320px, 54vw, 590px);
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #fff;
  background: #2d211c;
}
.om-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--om-hero-image, linear-gradient(135deg, #5b1c22, #1e1715)) center / cover no-repeat;
  transform: scale(1.01);
}
.om-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(20,12,10,.8), rgba(20,12,10,.25)); }
.om-hero-content { position: relative; z-index: 1; width: min(calc(100% - 32px), var(--om-width)); padding-block: 70px; }
.om-eyebrow { margin: 0 0 10px; color: #f0d39c; font-size: .78rem; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; }
.om-hero h1 { max-width: 780px; margin: 0; font-family: var(--om-heading-font); font-size: clamp(2.6rem, 8vw, 5.8rem); line-height: .98; }
.om-hero p { max-width: 650px; margin: 20px 0 0; font-size: clamp(1rem, 2vw, 1.25rem); }
.om-main { padding-block: clamp(40px, 7vw, 82px); }
.om-content-card { padding: clamp(22px, 5vw, 48px); border: 1px solid var(--om-line); border-radius: var(--om-radius); background: var(--om-card); box-shadow: var(--om-shadow); }
.om-page-title { margin: 0 0 28px; color: var(--om-primary); font-family: var(--om-heading-font); font-size: clamp(2rem, 5vw, 3.5rem); line-height: 1.1; }
.om-entry-content > :first-child { margin-top: 0; }
.om-entry-content > :last-child { margin-bottom: 0; }
.om-entry-content h2,
.om-entry-content h3 { font-family: var(--om-heading-font); line-height: 1.2; }
.om-entry-content .wp-block-button__link { background: var(--om-primary); }
.om-entry-content input,
.om-entry-content select,
.om-entry-content textarea { max-width: 100%; }
.om-info-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(24px, 5vw, 60px); align-items: start; }
.om-info-photo { overflow: hidden; min-height: 320px; border-radius: var(--om-radius); background: #e9ded1; box-shadow: var(--om-shadow); }
.om-info-photo img { width: 100%; height: 100%; min-height: 320px; object-fit: cover; }
.om-info-list { display: grid; gap: 14px; margin-top: 28px; }
.om-info-item { display: grid; grid-template-columns: 42px 1fr; gap: 12px; align-items: start; padding: 15px; border: 1px solid var(--om-line); border-radius: 14px; background: #fff; }
.om-info-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: color-mix(in srgb, var(--om-primary) 10%, white); color: var(--om-primary); font-weight: 800; }
.om-info-item strong { display: block; margin-bottom: 2px; }
.om-info-item p { margin: 0; color: var(--om-muted); white-space: pre-line; }
.om-social-block { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; margin-top: 22px; }
.om-social-heading { color: var(--om-ink); font-family: var(--om-heading-font); font-size: 1.08rem; }
.om-social-links { display: flex; flex-wrap: wrap; gap: 10px; }
.om-social-links a { width: 46px; height: 46px; display: grid; place-items: center; border: 1px solid var(--om-line); border-radius: 50%; background: #fff; color: var(--om-primary); box-shadow: 0 6px 18px rgba(45, 24, 18, 0.06); transition: transform .18s ease, background .18s ease, color .18s ease; }
.om-social-links a:hover,
.om-social-links a:focus-visible { background: var(--om-primary); color: #fff; transform: translateY(-2px); }
.om-social-links svg { width: 21px; height: 21px; fill: currentColor; }
.om-map { overflow: hidden; min-height: 340px; margin-top: clamp(28px, 5vw, 54px); border: 1px solid var(--om-line); border-radius: var(--om-radius); background: #e7e1da; }
.om-map iframe { display: block; width: 100%; height: 420px; border: 0; }
.om-site-footer { margin-top: 28px; padding: 28px 0; background: var(--om-primary); color: #fff; }
.om-footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 18px; }
.om-footer-inner p { margin: 0; }
.om-powered { color: rgba(255,255,255,.82); font-size: .9rem; }
.om-powered a { color: #fff; font-weight: 800; text-decoration: none; }
.om-powered a:hover { text-decoration: underline; }

/* Keep common restaurant-menu plugin output readable and responsive. */
.om-entry-content table { width: 100%; border-collapse: collapse; }
.om-entry-content td,
.om-entry-content th { padding: 12px; border-bottom: 1px solid var(--om-line); text-align: left; }
.om-entry-content [class*="menu-item"],
.om-entry-content [class*="pricelisto"] { max-width: 100%; }

@media (max-width: 760px) {
  .om-header-inner { min-height: 68px; }
  .om-brand { gap: 9px; max-width: calc(100% - 58px); }
  .om-brand .custom-logo { max-height: 44px; }
  .om-brand-name { font-size: 1.05rem; }
  .om-menu-toggle { display: block; }
  .om-nav { position: absolute; top: 100%; left: 0; right: 0; display: none; padding: 12px 16px 18px; border-bottom: 1px solid var(--om-line); background: var(--om-paper); }
  .om-nav.is-open { display: block; }
  .om-nav ul { align-items: stretch; flex-direction: column; }
  .om-nav a { text-align: center; }
  .om-hero { min-height: 390px; }
  .om-hero::after { background: rgba(20,12,10,.56); }
  .om-info-grid { grid-template-columns: 1fr; }
  .om-footer-inner { align-items: flex-start; flex-direction: column; }
}

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

/* ---------- 1.2.0: order buttons ---------- */
.om-order-buttons { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.om-order-button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border: 2px solid currentColor; border-radius: 999px; font-weight: 750; text-decoration: none; transition: background .18s ease, color .18s ease, border-color .18s ease; }
.om-order-buttons.is-hero .om-order-button { border-color: rgba(255,255,255,.75); color: #fff; }
.om-order-buttons.is-hero .om-order-button.is-primary { border-color: var(--om-accent); background: var(--om-accent); color: #fff; }
.om-order-buttons.is-hero .om-order-button:hover,
.om-order-buttons.is-hero .om-order-button:focus-visible { border-color: #fff; background: #fff; color: var(--om-primary); }
.om-order-buttons.is-info .om-order-button,
.om-order-buttons.is-stacked .om-order-button { border-color: var(--om-primary); color: var(--om-primary); }
.om-order-buttons.is-info .om-order-button.is-primary,
.om-order-buttons.is-stacked .om-order-button.is-primary,
.om-order-buttons.is-info .om-order-button:hover,
.om-order-buttons.is-stacked .om-order-button:hover { background: var(--om-primary); color: #fff; }
.om-order-buttons.is-stacked { flex-direction: column; margin-top: 12px; }
.om-order-buttons.is-stacked .om-order-button { width: 100%; }

/* ---------- 1.2.0: phone button bar ---------- */
.om-actionbar, .om-order-sheet { display: none; }
@media (max-width: 760px) {
  .om-has-actionbar { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  .om-actionbar { position: fixed; z-index: 90; left: 0; right: 0; bottom: 0; display: block; padding-bottom: env(safe-area-inset-bottom); border-top: 1px solid var(--om-line); background: #fff; box-shadow: 0 -8px 24px rgba(45,24,18,.08); }
  .om-actionbar-inner { display: grid; grid-template-columns: repeat(var(--om-actions, 4), 1fr); }
  .om-action { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 64px; padding: 6px 4px; border: 0; background: transparent; color: var(--om-primary); font: inherit; font-size: .76rem; font-weight: 750; line-height: 1.1; text-decoration: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
  .om-action svg { width: 23px; height: 23px; fill: currentColor; }
  .om-action:active, .om-action:focus-visible, .om-action[aria-expanded="true"] { background: color-mix(in srgb, var(--om-primary) 9%, #fff); outline: none; }
  .om-action-order { background: var(--om-primary); color: #fff; }
  .om-action-order:active, .om-action-order:focus-visible, .om-action-order[aria-expanded="true"] { background: var(--om-primary); color: #fff; opacity: .9; }
  .om-order-sheet { position: fixed; z-index: 91; left: 12px; right: 12px; bottom: calc(76px + env(safe-area-inset-bottom)); display: block; padding: 16px; border: 1px solid var(--om-line); border-radius: 20px; background: #fff; box-shadow: 0 18px 46px rgba(45,24,18,.22); }
  .om-order-sheet[hidden] { display: none; }
  .om-order-sheet-head { display: flex; align-items: center; justify-content: space-between; font-family: var(--om-heading-font); font-size: 1.1rem; }
  .om-order-close { width: 38px; height: 38px; border: 0; border-radius: 50%; background: #f4eee8; color: var(--om-ink); font-size: 1.5rem; line-height: 1; cursor: pointer; }
  /* OnlineMenu Menu plugin: lift the floating category button above the bar. */
  .om-has-actionbar .omm-mobile-trigger { bottom: calc(82px + env(safe-area-inset-bottom)); }
  .om-has-actionbar .omm-mobile-picker { bottom: calc(146px + env(safe-area-inset-bottom)); }
  .om-order-buttons.is-hero .om-order-button { flex: 1 1 auto; }
}
@media print { .om-actionbar, .om-order-sheet { display: none !important; } }

/* ---------- 1.2.0: open / closed status ---------- */
.om-status[hidden] { display: none; }
.om-status { display: flex; align-items: center; gap: .55em; }
.om-status-dot { flex: none; width: .55em; height: .55em; border-radius: 50%; background: #8c8580; }
.om-status.is-open .om-status-dot { background: #2f8a4c; box-shadow: 0 0 0 0 rgba(47, 138, 76, .45); animation: om-pulse 2.4s ease-out infinite; }
@keyframes om-pulse { 0% { box-shadow: 0 0 0 0 rgba(47, 138, 76, .45); } 70%, 100% { box-shadow: 0 0 0 .6em rgba(47, 138, 76, 0); } }
.om-status.is-large { margin: 2px 0 24px; color: var(--om-ink); font-family: var(--om-heading-font); font-size: clamp(1.45rem, 3vw, 2.05rem); font-weight: 700; line-height: 1.15; }
.om-hero .om-status.is-hero { display: inline-flex; width: auto; max-width: 100%; margin: 24px 0 0; padding: 9px 18px 9px 14px; border-radius: 999px; background: rgba(0, 0, 0, .38); color: #fff; font-size: 1rem; font-weight: 650; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.om-hero .om-status.is-hero[hidden] { display: none; }
.om-hero .om-status.is-hero.is-open .om-status-dot { background: #63d68f; }
.om-hero .om-status.is-hero.is-closed .om-status-dot { background: rgba(255, 255, 255, .55); }

/* ---------- 1.2.0: visit panel (information page) ---------- */
.om-info-grid.is-text-only { grid-template-columns: minmax(0, 760px); }
.om-visit { overflow: hidden; margin-top: clamp(34px, 6vw, 64px); border: 1px solid var(--om-line); border-radius: calc(var(--om-radius) + 6px); background: var(--om-card); box-shadow: var(--om-shadow); }
.om-visit-main { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); }
.om-visit-main.is-single { grid-template-columns: minmax(0, 1fr); }
.om-hours, .om-contact { padding: clamp(24px, 4vw, 46px); }
.om-contact { display: grid; align-content: start; gap: 30px; border-left: 1px solid var(--om-line); background: color-mix(in srgb, var(--om-primary) 4%, var(--om-paper)); }
.om-visit-main.is-single .om-contact { border-left: 0; }
.om-visit-heading { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; color: var(--om-muted); font-family: var(--om-body-font); font-size: .92rem; font-weight: 700; line-height: 1.3; }
.om-visit-heading svg { flex: none; width: 18px; height: 18px; fill: var(--om-primary); }

.om-week { margin: 0; padding: 0; list-style: none; font-variant-numeric: tabular-nums; }
.om-day { display: flex; align-items: baseline; gap: 12px; margin: 0 -14px; padding: 9px 14px; border-radius: 12px; }
.om-day-name { font-weight: 650; }
.om-day-leader { flex: 1 1 auto; min-width: 18px; border-bottom: 2px dotted color-mix(in srgb, var(--om-ink) 26%, transparent); transform: translateY(-5px); }
.om-day-time { font-family: var(--om-heading-font); font-size: 1.08rem; font-weight: 700; text-align: right; }
.om-day.is-closed .om-day-name,
.om-day.is-closed .om-day-time { color: var(--om-muted); font-weight: 500; }
.om-day.is-today { background: var(--om-primary); color: #fff; }
.om-day.is-today .om-day-name,
.om-day.is-today .om-day-time { color: #fff; }
.om-day.is-today .om-day-leader { border-bottom-color: rgba(255, 255, 255, .5); }
.om-hours-text { margin: 0; font-family: var(--om-heading-font); font-size: 1.15rem; line-height: 1.75; white-space: pre-line; }

.om-contact-big { margin: 0 0 8px; color: var(--om-ink); font-family: var(--om-heading-font); font-size: clamp(1.25rem, 2.3vw, 1.55rem); font-weight: 700; line-height: 1.3; }
.om-contact-big a { color: var(--om-primary); text-decoration: none; }
.om-contact-big a:hover { text-decoration: underline; text-underline-offset: 4px; }
.om-contact-link { color: var(--om-primary); font-weight: 700; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.om-contact-note { margin: 0; color: var(--om-muted); font-size: .95rem; }
.om-contact-mail { margin: 0; overflow-wrap: anywhere; }
.om-contact-mail a { color: var(--om-ink); font-weight: 600; }

.om-review { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 18px 32px; align-items: center; padding: clamp(22px, 3.5vw, 34px) clamp(24px, 4vw, 46px); border-top: 1px solid var(--om-line); }
.om-visit > .om-review:first-child { border-top: 0; }
.om-review.is-plain { grid-template-columns: minmax(0, 1fr) auto; }
.om-review-score { display: flex; align-items: center; gap: 14px; }
.om-review-number { color: var(--om-primary); font-family: var(--om-heading-font); font-size: clamp(2.6rem, 5vw, 3.4rem); font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.om-stars { position: relative; display: inline-block; line-height: 0; white-space: nowrap; }
.om-stars svg { width: 22px; height: 22px; margin-right: 2px; }
.om-stars-base svg { fill: color-mix(in srgb, var(--om-ink) 14%, transparent); }
.om-stars-fill { position: absolute; top: 0; left: 0; overflow: hidden; }
.om-stars-fill svg { fill: #e0a228; }
.om-review-text h2 { margin: 0; font-family: var(--om-heading-font); font-size: 1.3rem; line-height: 1.25; }
.om-review-text p { margin: 3px 0 0; color: var(--om-muted); }
.om-review-button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border: 2px solid var(--om-primary); border-radius: 999px; color: var(--om-primary); font-weight: 750; text-align: center; text-decoration: none; transition: background .18s ease, color .18s ease; }
.om-review-button:hover,
.om-review-button:focus-visible { background: var(--om-primary); color: #fff; }
.om-visit a:focus-visible { outline: 3px solid var(--om-accent); outline-offset: 3px; }

@media (max-width: 760px) {
  .om-visit-main { grid-template-columns: minmax(0, 1fr); }
  .om-contact { gap: 24px; border-top: 1px solid var(--om-line); border-left: 0; }
  .om-review, .om-review.is-plain { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .om-review-button { width: 100%; }
  .om-hero .om-status.is-hero { font-size: .95rem; }
}
@media (prefers-reduced-motion: reduce) { .om-status.is-open .om-status-dot { animation: none; } }

/* 1.3.1: review strip in the restaurant's main colour */
.om-review { border-top: 0; background: var(--om-primary); color: #fff; }
.om-review-number { color: #fff; }
.om-stars-base svg { fill: rgba(255, 255, 255, .28); }
.om-stars-fill svg { fill: #f2b53a; }
.om-review-text h2 { color: #fff; }
.om-review-text p { color: rgba(255, 255, 255, .82); }
.om-review-button { border-color: #fff; background: #fff; color: var(--om-primary); }
.om-review-button:hover,
.om-review-button:focus-visible { border-color: #fff; background: transparent; color: #fff; }
.om-review .om-review-button:focus-visible { outline-color: #fff; }

/* 1.3.2: animated warm background when no hero photo is set (CSS only, no images, no scripts). */
.om-hero-ambient { background: color-mix(in srgb, var(--om-primary) 45%, #120d0b); }
.om-hero-ambient::before { background: radial-gradient(120% 90% at 18% 20%, color-mix(in srgb, var(--om-primary) 80%, transparent), transparent 62%), linear-gradient(135deg, color-mix(in srgb, var(--om-primary) 62%, #1a100d), #1a100d); }
.om-hero-ambient::after { background: radial-gradient(90% 120% at 50% 110%, rgba(0,0,0,.42), transparent 60%), linear-gradient(90deg, rgba(14,9,7,.45), rgba(14,9,7,0) 70%); }
.om-ambient { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.om-ambient i { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .5; will-change: transform; }
.om-ambient i:nth-child(1) { width: 46vmax; height: 46vmax; left: -8vmax; top: -14vmax; background: radial-gradient(circle, var(--om-accent), transparent 68%); opacity: .5; animation: om-drift-a 22s ease-in-out infinite alternate; }
.om-ambient i:nth-child(2) { width: 38vmax; height: 38vmax; right: -10vmax; bottom: -16vmax; background: radial-gradient(circle, color-mix(in srgb, var(--om-primary) 70%, #fff 10%), transparent 68%); opacity: .75; animation: om-drift-b 26s ease-in-out infinite alternate; }
.om-ambient i:nth-child(3) { width: 26vmax; height: 26vmax; left: 46%; top: 8%; background: radial-gradient(circle, color-mix(in srgb, var(--om-accent) 55%, #fff 25%), transparent 66%); opacity: .26; animation: om-drift-c 30s ease-in-out infinite alternate; }
@keyframes om-drift-a { from { transform: translate3d(0,0,0) scale(1); } to { transform: translate3d(22vmax,10vmax,0) scale(1.18); } }
@keyframes om-drift-b { from { transform: translate3d(0,0,0) scale(1.1); } to { transform: translate3d(-24vmax,-8vmax,0) scale(.9); } }
@keyframes om-drift-c { from { transform: translate3d(0,0,0) scale(.9); } to { transform: translate3d(-18vmax,16vmax,0) scale(1.25); } }
@media (max-width: 700px) { .om-ambient i { filter: blur(48px); } }
@media (prefers-reduced-motion: reduce) { .om-ambient i { animation: none; } }
