/* Small shared pieces: buttons, chips, section heads and the restaurant card. */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 26px;
  border: 1px solid var(--bordo);
  border-radius: 999px;
  background: var(--bordo);
  color: var(--on-bordo);
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap;
  transition: background-color 0.18s, border-color 0.18s, transform 0.18s var(--ease);
}
.button:hover { background: var(--bordo-hover); border-color: var(--bordo-hover); }
.button:active { transform: scale(0.98); }
.button--line { background: transparent; border-color: var(--field); color: var(--ink); }
.button--line:hover { background: var(--surface); border-color: var(--field); }
.button--small { min-height: 44px; padding: 0 20px; font-size: 14.5px; }
.button--wide { width: 100%; }

.round-button {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--field);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  transition: background-color 0.18s;
}
.round-button:hover { background: var(--surface-2); }
.round-button--dark { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.round-button--dark:hover { background: var(--soft); }

.chip-row { display: flex; gap: 7px; }
.chip-row--wrap { flex-wrap: wrap; }
.chip-row--scroll { min-width: 0; overflow-x: auto; }

/* Swipe rows show no scrollbar. */
.chip-row--scroll, .tonight__row, .review-row { scrollbar-width: none; }
.chip-row--scroll::-webkit-scrollbar, .tonight__row::-webkit-scrollbar, .review-row::-webkit-scrollbar { display: none; }

.chip {
  display: inline-flex;
  flex: none;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--field);
  border-radius: 999px;
  background: var(--surface);
  color: var(--soft);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.18s, color 0.18s, border-color 0.18s;
}
.chip:hover { border-color: var(--muted); }
.chip--on { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.chip--on:hover { border-color: var(--ink); }

.text-link {
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.rating { display: inline-flex; align-items: center; gap: 5px; font-size: 14px; color: var(--soft); }
.rating b { font-weight: 600; color: var(--ink); }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}
.section-head h2 { font-size: clamp(34px, 3.8vw, 54px); }
.section-head__note { font-size: 15px; color: var(--soft); white-space: nowrap; }

.list-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 24px;
}

.sort-menu { position: relative; flex: none; }
.sort-menu summary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--field);
  border-radius: 999px;
  background: var(--surface);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  list-style: none;
}
.sort-menu summary::-webkit-details-marker { display: none; }
.sort-menu__list {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 20;
  display: grid;
  gap: 3px;   /* the hovered and the chosen row stay two shapes, not one merged block (owner, 2026-11-23) */
  min-width: 210px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  animation: menu-in 0.18s var(--ease);
}
.sort-menu__list a { padding: 11px 12px; border-radius: 10px; font-size: 14.5px; }
.sort-menu__list a:hover { background: color-mix(in srgb, var(--surface-2) 55%, var(--surface)); }
.sort-menu__list a[aria-current] { background: var(--surface-2); font-weight: 600; }

@keyframes menu-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: none; }
}

/* A labelled field: search form and booking sheet. */
.search-field {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  min-height: 48px;
  padding: 0 14px;
  border-right: 1px solid var(--line);
  color: var(--soft);
}
.field-text { display: grid; flex: 1; min-width: 0; }
.field-label { font-size: 12.5px; line-height: 1.25; color: var(--muted); }
.field-value, .search-field input[type='search'] {
  overflow: hidden;
  color: var(--ink);
  font-size: 15.5px;
  font-weight: 500;
  line-height: 1.35;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* An opened sheet takes the focus itself and shows no ring around the whole panel. */
.search:focus, .booking:focus { outline: none; }

/* The dimmed page behind an open sheet. */
.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgb(42 33 28 / 0.42);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.26s, visibility 0s linear 0.26s;
}
html.sheet-open .sheet-backdrop {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.26s, visibility 0s;
}

.restaurant-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px 28px;
  margin-top: 30px;
}

.restaurant-card { min-width: 0; }
.restaurant-card__photo {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 18px;
  background: var(--surface-2);
}
.restaurant-card__photo a { display: block; height: 100%; }
.restaurant-card__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}
@media (hover: hover) {
  .restaurant-card:hover .restaurant-card__photo img { transform: scale(1.025); }
}

.favourite-button {
  position: absolute;
  right: 10px;
  top: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  transition: transform 0.2s var(--ease);
}
.favourite-button:active { transform: scale(0.9); }
.favourite-button[aria-pressed='true'] { color: var(--bordo); }
.favourite-button[aria-pressed='true'] .icon { fill: var(--bordo); }

.restaurant-card__body { padding-top: 14px; }
.restaurant-card__title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.restaurant-card__title h3 { font-size: 27px; line-height: 1.1; }
.restaurant-card__plain { font-size: 13.5px; color: var(--muted); }
.restaurant-card__price { font-size: 14px; color: var(--soft); white-space: nowrap; }
.restaurant-card__place { margin-top: 3px; font-size: 14.5px; color: var(--muted); }
.restaurant-card__meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 9px; }
.restaurant-card__meta .text-link { font-size: 14px; }

.slot-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.slot {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 13px;
  border: 1px solid var(--bordo);
  border-radius: 999px;
  color: var(--bordo);
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  transition: background-color 0.18s, color 0.18s;
}
.slot:hover { background: var(--bordo); color: var(--on-bordo); }

.empty-list {
  display: grid;
  justify-items: center;
  gap: 10px;
  margin-top: 30px;
  padding: 56px 20px;
  border: 1px solid var(--line);
  border-radius: 20px;
  text-align: center;
}
.empty-list h3 { font-size: 30px; }
.empty-list p { color: var(--soft); }
.empty-list .button { margin-top: 8px; }

@media (max-width: 1024px) {
  .restaurant-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .section-head h2 { font-size: 34px; }
  .list-tools { flex-direction: column; align-items: flex-start; gap: 10px; margin-top: 16px; }
  .list-tools .chip-row { width: calc(100% + 2 * var(--gutter)); margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); }
  .sort-menu__list { right: auto; left: 0; }

  .restaurant-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; margin-top: 18px; }
  .restaurant-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--surface);
  }
  .restaurant-card__photo { border-radius: 0; aspect-ratio: 16 / 10; }
  .restaurant-card__body { padding: 12px 14px 14px; }
  .restaurant-card__title h3 { font-size: 24px; }
  .chip, .slot { min-height: 44px; }
}
