/*
 * OhkaStudio widgets: default look. Each site themes them by setting these
 * variables (on :root or on the element holding the widget):
 *   --ohka-accent        buttons, selected day/time, active tab
 *   --ohka-accent-ink    text on the accent colour
 *   --ohka-ink           main text
 *   --ohka-muted         secondary text
 *   --ohka-surface       backgrounds of inputs, days, times, dishes
 *   --ohka-line          borders
 *   --ohka-radius        corner radius
 *   --ohka-font          font family (defaults to the page's font)
 *   --ohka-heading-font  font for section and dish names
 */
.ohka {
  --_accent: var(--ohka-accent, #1f4d3a);
  --_accent-ink: var(--ohka-accent-ink, #ffffff);
  --_ink: var(--ohka-ink, #1c1917);
  --_muted: var(--ohka-muted, #6b6560);
  --_surface: var(--ohka-surface, #ffffff);
  --_line: var(--ohka-line, rgba(0, 0, 0, 0.12));
  --_radius: var(--ohka-radius, 12px);
  font-family: var(--ohka-font, inherit);
  color: var(--_ink);
  line-height: 1.5;
  text-align: left;
}
.ohka *,
.ohka *::before,
.ohka *::after {
  box-sizing: border-box;
}
.ohka button {
  font: inherit;
  color: inherit;
}
.ohka-loading {
  width: 28px;
  height: 28px;
  margin: 2rem auto;
  border: 3px solid var(--ohka-line, rgba(0, 0, 0, 0.12));
  border-top-color: var(--ohka-accent, #1f4d3a);
  border-radius: 50%;
  animation: ohka-spin 0.8s linear infinite;
}
@keyframes ohka-spin {
  to {
    transform: rotate(360deg);
  }
}
.ohka-error {
  margin: 0.75rem 0;
  padding: 0.7rem 0.9rem;
  border-radius: var(--ohka-radius, 12px);
  background: #fef2f2;
  color: #991b1b;
  font-size: 0.95rem;
}
.ohka-error[hidden] {
  display: none;
}
.ohka-empty {
  color: var(--ohka-muted, #6b6560);
}

/* ---------- menu ---------- */
.ohka-tabs {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  padding: 0 0 0.75rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--_line);
}
.ohka-tab {
  flex-shrink: 0;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  padding: 0.55rem 1rem;
  border: 1px solid var(--_line);
  border-radius: 999px;
  background: var(--_surface);
  cursor: pointer;
  font-weight: 600;
  white-space: nowrap;
}
.ohka-tab[aria-selected="true"] {
  background: var(--_accent);
  border-color: var(--_accent);
  color: var(--_accent-ink);
}
.ohka-section-name {
  margin: 1.75rem 0 0.5rem;
  font-family: var(--ohka-heading-font, inherit);
  font-size: 1.25rem;
}
.ohka-section.depth-2 > .ohka-section-name {
  font-size: 1.05rem;
  color: var(--_muted);
}
.ohka-section-desc {
  margin: 0 0 0.75rem;
  color: var(--_muted);
  font-size: 0.95rem;
}
.ohka-dish {
  display: flex;
  gap: 1rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--_line);
}
.ohka-dish-photo {
  width: 84px;
  height: 84px;
  flex-shrink: 0;
  object-fit: cover;
  border-radius: var(--_radius);
}
.ohka-dish-body {
  flex: 1;
  min-width: 0;
}
.ohka-dish-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}
.ohka-dish-name {
  margin: 0;
  font-family: var(--ohka-heading-font, inherit);
  font-size: 1.05rem;
  font-weight: 600;
}
.ohka-price {
  flex-shrink: 0;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.ohka-dish-desc {
  margin: 0.2rem 0 0;
  color: var(--_muted);
  font-size: 0.95rem;
}
.ohka-tags {
  display: inline-flex;
  gap: 0.25rem;
  margin-left: 0.45rem;
  vertical-align: 2px;
}
.ohka-tag {
  display: inline-grid;
  place-items: center;
  min-width: 1.6rem;
  height: 1.25rem;
  padding: 0 0.3rem;
  border-radius: 999px;
  font-family: var(--ohka-font, inherit);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-decoration: none;
  background: #ecebe6;
  color: #4a4740;
}
.ohka-tag-v {
  background: #e3f1dc;
  color: #2f6b24;
}
.ohka-tag-vg {
  background: #2f6b24;
  color: #ffffff;
}
.ohka-tag-gf {
  background: #fbefd5;
  color: #8a5a00;
}
.ohka-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.25rem;
  margin: 0.45rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.95rem;
}
.ohka-options li {
  display: flex;
  gap: 0.4rem;
  font-variant-numeric: tabular-nums;
}
.ohka-options span {
  color: var(--_muted);
}
.ohka-allergens {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem;
  margin: 0.5rem 0 0;
}
.ohka-allergens-label {
  margin-right: 0.15rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--_muted);
}
.ohka-allergen {
  padding: 0.1rem 0.5rem;
  border: 1px solid var(--_line);
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--_ink);
  background: var(--_surface);
}
/* switching menu sections: a short fade and lift */
.ohka-section.ohka-enter {
  animation: ohka-enter 0.28s ease-out;
}
@keyframes ohka-enter {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .ohka-section.ohka-enter {
    animation: none;
  }
}
.ohka-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-right: 1rem;
}
.ohka-legend {
  margin: 1.5rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--_line);
  font-size: 0.85rem;
  color: var(--_muted);
}
.ohka-legend p {
  margin: 0 0 0.5rem;
}

/* ---------- opening hours ---------- */
.ohka-hours table {
  width: 100%;
  border-collapse: collapse;
}
.ohka-hours th,
.ohka-hours td {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--_line);
  text-align: left;
  font-weight: 400;
  vertical-align: top;
}
.ohka-hours td {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.ohka-hours .is-today th,
.ohka-hours .is-today td {
  font-weight: 700;
}
.ohka-hours .is-closed {
  color: var(--_muted);
}
.ohka-today {
  margin-left: 0.5rem;
  padding: 0.05rem 0.45rem;
  border-radius: 999px;
  background: var(--_accent);
  color: var(--_accent-ink);
  font-size: 0.7rem;
  font-weight: 700;
  vertical-align: 2px;
}
.ohka-closures {
  margin-top: 1rem;
  font-size: 0.92rem;
}
.ohka-closures p {
  margin: 0 0 0.25rem;
  font-weight: 700;
}
.ohka-closures ul {
  margin: 0;
  padding-left: 1.1rem;
}

/* ---------- Google rating ---------- */
.ohka-rating {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: inherit;
  text-decoration: none;
  font-size: 0.95rem;
}
a.ohka-rating:hover .ohka-count {
  text-decoration: underline;
}
.ohka-g {
  display: inline-grid;
  place-items: center;
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 50%;
  background: #fff;
  color: #4285f4;
  font-weight: 800;
  font-size: 0.85rem;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
}
.ohka-stars {
  letter-spacing: 1px;
  background: linear-gradient(90deg, #f5b301 var(--ohka-fill, 100%), rgba(128, 128, 128, 0.45) var(--ohka-fill, 100%));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.ohka-count {
  opacity: 0.85;
}

/* ---------- booking ---------- */
.ohka-booking {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.ohka-steps {
  display: flex;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: ohka-step;
  font-size: 0.82rem;
  color: var(--_muted);
}
.ohka-steps li {
  flex: 1;
  padding-top: 0.45rem;
  border-top: 3px solid var(--_line);
}
.ohka-steps li.is-current,
.ohka-steps li.is-done {
  border-top-color: var(--_accent);
  color: var(--_ink);
}
.ohka-steps li.is-current {
  font-weight: 700;
}
.ohka-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.ohka-field > label,
.ohka-label {
  font-weight: 600;
  font-size: 0.95rem;
}
.ohka-input {
  width: 100%;
  min-height: 46px;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--_line);
  border-radius: var(--_radius);
  background: var(--_surface);
  color: var(--_ink);
  font: inherit;
}
textarea.ohka-input {
  resize: vertical;
}
.ohka-input:focus-visible,
.ohka-day:focus-visible,
.ohka-time:focus-visible,
.ohka-btn:focus-visible,
.ohka-tab:focus-visible {
  outline: 2px solid var(--_accent);
  outline-offset: 2px;
}
.ohka-hint {
  margin: 0;
  font-size: 0.85rem;
  color: var(--_muted);
}
.ohka-note {
  margin: 0;
  padding: 0.65rem 0.85rem;
  border-radius: var(--_radius);
  background: var(--_surface);
  border: 1px solid var(--_line);
  font-size: 0.92rem;
}
.ohka-note a {
  color: inherit;
  font-weight: 700;
}
.ohka-days {
  display: flex;
  gap: 0.45rem;
  overflow-x: auto;
  padding-bottom: 0.6rem;
}
.ohka-day {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 4.1rem;
  padding: 0.5rem 0;
  border: 1px solid var(--_line);
  border-radius: var(--_radius);
  background: var(--_surface);
  cursor: pointer;
  font-size: 0.78rem;
  line-height: 1.25;
}
.ohka-day strong {
  font-size: 1.25rem;
}
.ohka-day[aria-selected="true"],
.ohka-time[aria-pressed="true"] {
  background: var(--_accent);
  border-color: var(--_accent);
  color: var(--_accent-ink);
}
.ohka-times {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(4.75rem, 1fr));
  gap: 0.45rem;
}
.ohka-time {
  min-height: 44px;
  border: 1px solid var(--_line);
  border-radius: var(--_radius);
  background: var(--_surface);
  cursor: pointer;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.ohka-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.25rem;
}
.ohka-btn {
  min-height: 46px;
  padding: 0.6rem 1.4rem;
  border: 1px solid var(--_accent);
  border-radius: 999px;
  background: var(--_accent);
  color: var(--_accent-ink) !important;
  font-weight: 700;
  cursor: pointer;
}
.ohka-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.ohka-btn-ghost {
  background: transparent;
  color: var(--_ink) !important;
  border-color: var(--_line);
}
.ohka-booking form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.ohka-summary {
  margin: 0;
  padding: 0.7rem 0.9rem;
  border-radius: var(--_radius);
  background: var(--_surface);
  border: 1px solid var(--_line);
}
.ohka-done {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  text-align: center;
  padding: 1rem 0;
}
.ohka-done h3 {
  margin: 0;
  font-family: var(--ohka-heading-font, inherit);
  font-size: 1.5rem;
}
.ohka-done p {
  margin: 0;
}
.ohka-check {
  display: grid;
  place-items: center;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  background: var(--_accent);
  color: var(--_accent-ink);
  font-size: 1.5rem;
  font-weight: 700;
}
@media (max-width: 480px) {
  .ohka-dish-photo {
    width: 64px;
    height: 64px;
  }
  .ohka-actions .ohka-btn {
    flex: 1;
  }
}
.ohka-service {
  display: block;
  white-space: nowrap;
}
.ohka-service > span {
  color: var(--_muted);
}

/* slim, rounded scrollbars for the sideways lists (menu sections, booking days) */
/* Firefox only: Chrome would ignore the custom ::-webkit-scrollbar look below
   if these standard properties were set */
@supports not selector(::-webkit-scrollbar) {
  .ohka-tabs,
  .ohka-days {
    scrollbar-width: thin;
    scrollbar-color: color-mix(in srgb, var(--_ink) 25%, transparent) transparent;
  }
}
.ohka-tabs::-webkit-scrollbar,
.ohka-days::-webkit-scrollbar {
  height: 6px;
}
.ohka-tabs::-webkit-scrollbar-track,
.ohka-days::-webkit-scrollbar-track {
  background: transparent;
}
.ohka-tabs::-webkit-scrollbar-thumb,
.ohka-days::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--_ink) 22%, transparent);
  border-radius: 999px;
}
.ohka-tabs:hover::-webkit-scrollbar-thumb,
.ohka-days:hover::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--_ink) 40%, transparent);
}
.ohka-tabs::-webkit-scrollbar-button,
.ohka-days::-webkit-scrollbar-button {
  display: none;
}
