/* ==========================================================================
     Directory page layer: functional layout built on the shared system.
     ========================================================================== */

/* Restaurant announcement strip */
.ownstrip {
  background: var(--blue);
  color: var(--surface);
}
.ownstrip .wrap {
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: var(--fs-xs);
  text-align: center;
}
.ownstrip a {
  font-weight: 600;
  color: var(--surface);
  text-decoration: none;
  white-space: nowrap;
}
.ownstrip a:focus-visible {
  outline-color: var(--surface);
}
.ownstrip .short {
  display: none;
}
@media (max-width: 600px) {
  .ownstrip .wrap {
    height: 40px;
  }
  .ownstrip .full {
    display: none;
  }
  .ownstrip .short {
    display: inline;
  }
}

/* Discovery */
.disc {
  padding-top: var(--sp-64);
} /* now the page's opening section */
@media (max-width: 900px) {
  .disc {
    padding-top: var(--sp-48);
  }
}
@media (max-width: 680px) {
  .disc {
    padding-top: var(--sp-32);
  }
}
.lh {
  margin-bottom: var(--sp-12);
  font-size: var(--fs-display-page);
}
.lsub {
  margin: 0 0 var(--sp-32);
  max-width: var(--measure-lede);
}
.dsearch {
  display: grid;
  grid-template-columns:
    minmax(160px, 200px) minmax(0, 1.35fr) minmax(0, 1fr)
    auto;
  gap: var(--sp-12);
  align-items: end;
  padding: var(--sp-16);
  background: var(--surface);
  border: var(--border);
  border-radius: var(--r-md);
}
.dsearch .field {
  min-width: 0;
}
.dsearch .field :is(label, .label) {
  display: block;
  margin: 0 0 var(--sp-8) 2px;
  font-size: var(--fs-sm);
  font-weight: 600;
}
.dsearch .in {
  height: var(--h-lg);
  padding: 0 var(--sp-8) 0 var(--sp-16);
}
/* "What?" channel: shows Collection as a compact selector. Static until a second channel exists;
     to enable, swap the .in.channel span for a <select class="in channel"> with the same classes. */
.dsearch .in.channel {
  justify-content: space-between;
  gap: var(--sp-8);
  padding: 0 var(--sp-16);
  font-size: var(--fs-lg);
  color: var(--ink);
  cursor: default;
  user-select: none;
}
.dsearch .in.channel svg {
  width: var(--icon-sm);
  height: var(--icon-sm);
  color: var(--muted);
  flex: none;
}
.locate {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: var(--h-chip);
  padding: 0 var(--sp-12);
  border: 0;
  border-radius: var(--r-xs);
  background: var(--chip);
  font-size: var(--fs-xs);
  font-weight: 600;
  cursor: pointer;
}
.locate:hover {
  background: var(--line);
}
.locate:active {
  background: var(--line-strong);
}
.locate svg {
  width: 15px;
  height: 15px;
}
@media (max-width: 1200px) {
  .dsearch {
    grid-template-columns: minmax(160px, 200px) minmax(0, 1fr);
  }
  .dsearch .field.q {
    grid-column: 1 / -1;
  }
  .dsearch .btn {
    grid-column: 1 / -1;
    width: 100%;
  }
  .locate span {
    display: none;
  }
  .locate {
    width: var(--h-chip);
    padding: 0;
    justify-content: center;
  }
}
@media (max-width: 600px) {
  .dsearch {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Filters */
.filters {
  display: flex;
  align-items: center;
  gap: var(--sp-8);
  flex-wrap: wrap;
  margin-top: var(--sp-32);
  padding-bottom: var(--sp-24);
  scroll-margin-top: 140px;
}
.count {
  margin-left: auto;
  font-size: var(--fs-sm);
  color: var(--muted);
}
.resnote {
  margin: calc(var(--sp-8) * -1) 0 var(--sp-16);
  font-size: var(--fs-md);
  color: var(--muted);
}
.resnote:empty {
  display: none;
}
@media (max-width: 680px) {
  .filters {
    padding-bottom: var(--sp-16);
  }
  .count {
    display: none;
  }
}

/* Results grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--sp-24);
  padding-bottom: var(--sp-56);
}
.empty {
  grid-column: 1/-1;
  text-align: center;
  padding: var(--sp-56) 0;
  color: var(--muted);
}
@media (max-width: 680px) {
  .grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Load more */
.more {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-16);
  padding: var(--sp-8) 0 var(--sp-64);
  margin-top: calc(var(--sp-24) * -1);
}
.more[hidden],
.loadmore[hidden] {
  display: none !important;
}
.showing {
  margin: 0;
  font-size: var(--fs-sm);
  color: var(--muted);
}
.loadmore {
  padding: 0 var(--sp-24);
}

/* Compact sticky search */
.ssearch {
  position: fixed;
  left: 0;
  right: 0;
  top: 70px;
  z-index: 19;
  background: rgba(250, 249, 246, 0.96);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: var(--border);
  transform: translateY(-8px);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.18s,
    transform 0.18s;
}
.ssearch.on {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.ssearch .wrap {
  padding-top: 10px;
  padding-bottom: 10px;
}
.sform {
  display: flex;
  gap: var(--sp-8);
  max-width: 760px;
}
.sin {
  flex: 1;
  min-width: 0;
  height: var(--h-md);
  padding: 0 var(--sp-12);
}
.sin > svg {
  width: var(--icon-sm);
  height: var(--icon-sm);
}
.sform .btn {
  flex: none;
}
.scompact {
  display: none;
}
@media (max-width: 680px) {
  .ssearch {
    top: 64px;
  }
  .scompact {
    display: flex;
    width: 100%;
    height: var(--h-md);
    padding: 0 var(--sp-12);
    font-size: var(--fs-md);
    color: var(--muted);
    cursor: pointer;
    text-align: left;
  }
  .scompact svg {
    width: var(--icon-sm);
    height: var(--icon-sm);
  }
  .scompact:hover {
    border-color: var(--line-strong);
  }
  .scompact span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .sform {
    display: none;
    flex-direction: column;
  }
  .ssearch.open .sform {
    display: flex;
  }
  .ssearch.open .scompact {
    display: none;
  }
  .sform .sin {
    flex: none;
  }
}

/* Band placement */
#restaurants .band {
  margin-bottom: var(--section-y);
}

/* Detail drawer */
.scrim {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: var(--scrim);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.scrim.on {
  opacity: 1;
  pointer-events: auto;
}
.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  width: min(460px, 100%);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--surface);
  transform: translateX(100%);
  transition: transform 0.25s ease;
}
.drawer.on {
  transform: none;
}
.dhero {
  position: relative;
  height: 200px;
  flex: none;
  background-color: var(--cream);
  background-size: cover;
  background-position: center;
}
.drawer .x {
  position: absolute;
  top: var(--sp-16);
  right: var(--sp-16);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.95);
  cursor: pointer;
}
.drawer .x:hover {
  background: var(--surface);
}
.drawer .x:active {
  background: var(--chip);
}
.drawer .x svg {
  width: var(--icon-md);
  height: var(--icon-md);
}
.dscroll {
  flex: 1;
  overflow-y: auto;
  padding: 0 var(--sp-24) var(--sp-24);
}
.dhead {
  display: flex;
  gap: var(--sp-12);
  align-items: center;
  margin-top: var(--sp-24);
}
.dhead .icon {
  width: 64px;
  height: 64px;
  font-size: 26px;
}
.dhead .icon.serviette .nmark {
  width: 36px;
  height: 36.7px;
}
.dhead .name {
  font-size: var(--fs-title-l);
  white-space: normal;
}
.dhead .tagline {
  white-space: normal;
}
.dhead .meta {
  flex-wrap: wrap;
}
.dsec {
  margin-top: var(--sp-24);
}
.dsec h4 {
  margin: 0 0 var(--sp-12);
}
.dmore {
  margin: var(--sp-8) 0 0;
  font-size: var(--fs-xs);
  color: var(--muted);
}
.hours {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 6px var(--sp-12);
  font-size: var(--fs-md);
}
.hours .today {
  font-weight: 600;
}
.tiernote {
  padding: var(--sp-16);
  background: var(--bg);
  border-radius: var(--r-md);
  font-size: var(--fs-sm);
  line-height: var(--lh-body);
  color: var(--body);
}
.tiernote b {
  color: var(--ink);
}
.tiernote a {
  color: var(--blue);
  font-weight: 600;
  text-decoration: none;
} /* same treatment as the card claim link */
.tiernote a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.dfoot {
  flex: none;
  padding: var(--sp-16) var(--sp-24) var(--sp-24);
  border-top: var(--border);
}
.dfoot .btn {
  width: 100%;
}
.dfoot .small {
  margin-top: var(--sp-8);
  text-align: center;
  font-size: var(--fs-xs);
  color: var(--muted);
}

/* ==========================================================================
   Added for the website (the prototype showed these in a drawer and filled them in with script)
   ========================================================================== */

/* the whole card is the link to its page; the buttons and links on it stay their own */
.card .cardlink::after {
  content: '';
  position: absolute;
  inset: 0;
}
.card .claimline a,
.card .btn {
  position: relative;
  z-index: 1;
}
.card .hero svg.doodle {
  color: var(--ink);
}

/* filters as links, and the two selects that sit among them */
a.chip {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.filters form.inline {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-8);
  margin: 0;
}
.locate span {
  white-space: nowrap;
}

/* a restaurant's page: the drawer's content as a page */
.rpage {
  padding-top: var(--sp-32);
  padding-bottom: var(--section-y);
  max-width: 760px;
}
.crumbs {
  display: flex;
  align-items: center;
  gap: var(--sp-8);
  margin-bottom: var(--sp-16);
  font-size: var(--fs-sm);
  color: var(--muted);
}
.crumbs a {
  color: var(--body);
  text-decoration: none;
}
.crumbs a:hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.rcard {
  background: var(--surface);
  border: var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.rcard .dhero {
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.rcard .dhero .doodle {
  position: static;
  transform: none;
  width: 110px;
  height: 110px;
  color: var(--ink);
  opacity: 0.8;
}
.rbody {
  padding: 0 var(--sp-24) var(--sp-24);
}
.rcard .name {
  margin: 0;
  font-size: var(--fs-title-l);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: var(--ls-title);
  white-space: normal;
}
.rcard .name .branch {
  color: var(--muted);
  font-weight: 500;
}
.rcard .dfoot {
  border-top: var(--border);
}
.rbody .about {
  margin: 0;
  font-size: var(--fs-md);
  line-height: var(--lh-body);
  color: var(--body);
}
.rbody .where {
  font-size: var(--fs-md);
  line-height: 1.5;
}
.rbody .muted {
  color: var(--muted);
}
