/* ─── Lisbon header ───
 * Over a photo hero or page banner: a transparent full-width bar with white type and a hairline under the row; the
 * photo runs edge to edge beneath it. As soon as the visitor scrolls, the bar fills in with the page background and the
 * type darkens, driven by scroll position (--lisbon-scroll-p from assets/main.js). Pages without a photo banner get
 * the solid bar from the start. The bar keeps one height in both states. The surface is drawn on ::before.
 */
:root {
    --lisbon-bar-height: var(--ocf-header-height);
    --lisbon-sticky-top: calc(var(--wp-admin-bar-offset) + var(--lisbon-bar-height) + var(--ocf-grid-gap));
}

@media (max-width: 1080px) { :root { --lisbon-bar-height: var(--ocf-header-height-mobile); } }

.nav-bar {
    /* --lisbon-nav-p: 0 over the top of a photo hero/banner, 1 once scrolled (assets/main.js eases it in over the first
     * ~200px of scroll, about 75% after the first 100px). Pages without a photo banner sit at 1. */
    --lisbon-nav-p: 1;
    --lisbon-nav-pct: calc(var(--lisbon-nav-p) * 100%);
    /* Type darkens a little ahead of the fill so the in-between state stays readable. */
    --lisbon-nav-ink: color-mix(in srgb, var(--ocf-heading) calc(min(1, var(--lisbon-nav-p) * 1.3) * 100%), var(--ocf-heading-alt));
    position: sticky;
    top: var(--wp-admin-bar-offset);
    z-index: 100;
    isolation: isolate;
    color: var(--lisbon-nav-ink);
}

/* Over a photo: the bar sits on top of the hero/banner and follows the scroll progress. */
body:has(.ocf-hero, .ocf-page-header) .nav-bar {
    --lisbon-nav-p: var(--lisbon-scroll-p, 0);
    margin-bottom: calc(var(--lisbon-bar-height) * -1);
}

/* Open mobile menu (base.js sets aria-expanded on the button): solid bar, dark type. */
.nav-bar:has(#mobile-menu-btn[aria-expanded="true"]) { --lisbon-nav-p: 1 !important; }

.nav-bar::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: color-mix(in srgb, var(--ocf-bg) var(--lisbon-nav-pct), transparent);
    box-shadow: 0 1px 0 color-mix(in srgb, var(--ocf-border) var(--lisbon-nav-pct), transparent), 0 10px 24px -18px color-mix(in srgb, var(--lisbon-shadow-color) calc(var(--lisbon-nav-p) * 35%), transparent);
}

/* Hairline under the row while the bar is over the photo; fades out as the bar fills in. */
.nav-bar::after {
    content: "";
    position: absolute;
    right: var(--container-pad);
    bottom: 0;
    left: var(--container-pad);
    height: 1px;
    background: color-mix(in srgb, var(--ocf-heading-alt) 22%, transparent);
    opacity: calc(1 - var(--lisbon-nav-p));
}

.nav-bar > .container-global {
    width: auto;
    max-width: none;
    margin: 0;
    padding: 0 var(--container-pad);
}

.nav-inner {
    display: flex;
    align-items: center;
    gap: clamp(16px, 2vw, 32px);
    min-height: var(--lisbon-bar-height);
}

.nav-logo { display: inline-flex; align-items: center; flex: 0 1 var(--ocf-logo-width); min-width: 0; }
.nav-logo-img { width: var(--ocf-logo-width); height: var(--ocf-logo-height); object-fit: contain; object-position: left center; }

.nav-links {
    display: flex;
    align-items: center;
    gap: clamp(18px, 2.2vw, 32px);
    margin-inline: auto;
    font-family: var(--ocf-font-body), system-ui, sans-serif;
    font-size: calc(var(--font-body-size) * 1.03);
    font-weight: var(--font-weight-semibold);
}

.nav-link,
.nav-dropdown-trigger {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 12px 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    white-space: nowrap;
}

.nav-dropdown-trigger svg { width: 14px; height: 14px; }

.nav-links .nav-link::after,
.nav-links .nav-dropdown-trigger::after {
    content: '';
    position: absolute;
    right: 0;
    bottom: 6px;
    left: 0;
    height: 2px;
    border-radius: 2px;
    background: var(--ocf-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--duration) var(--ease);
}

.nav-links .nav-link:hover::after,
.nav-links .nav-dropdown-trigger:hover::after,
.nav-links [aria-current="page"]::after { transform: scaleX(1); }

/* Desktop dropdown: a white card with two columns of links, then the "view all" link. */
.nav-dropdown { position: relative; }

.nav-dropdown-panel {
    position: absolute;
    top: calc(100% + 14px);
    left: calc(var(--ocf-grid-gap) * -1.25);
    display: block;
    width: var(--ocf-nav-dropdown-width);
    padding: 20px;
    border-radius: 24px;
    background: var(--lisbon-card);
    color: var(--ocf-heading);
    box-shadow: 0 24px 48px -24px color-mix(in srgb, var(--lisbon-shadow-color) 40%, transparent);
    opacity: 0;
    visibility: hidden;
    font-size: calc(var(--font-body-size) * 0.94);
    font-weight: var(--font-weight-semibold);
}

/* Hover bridge across the gap between the pill and the panel. */
.nav-dropdown-panel::before {
    content: "";
    position: absolute;
    inset: -18px 0 auto;
    height: 18px;
}

.nav-dropdown:focus-within > .nav-dropdown-panel { opacity: 1; visibility: visible; }

.nav-dropdown-panel .dropdown-menu {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px 8px;
}

.nav-dropdown-panel .dropdown-menu a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 14px;
}

.nav-dropdown-panel .dropdown-menu a::after {
    content: "";
    flex: 0 0 auto;
    width: 15px;
    height: 15px;
    background: var(--ocf-primary);
    -webkit-mask: var(--lisbon-arrow) center / contain no-repeat;
    mask: var(--lisbon-arrow) center / contain no-repeat;
    opacity: 0;
    transform: translateX(-4px);
    transition: opacity var(--duration) var(--ease), transform var(--duration) var(--ease);
}

.nav-dropdown-panel .dropdown-menu a:hover { background: var(--ocf-bg); }
.nav-dropdown-panel .dropdown-menu a:hover::after { opacity: 1; transform: none; }

.nav-dropdown-panel > a.dropdown-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    margin-top: 12px;
    padding: 14px 14px 2px;
    border-top: var(--card-border-width) solid var(--ocf-border);
    color: var(--ocf-link);
}

.nav-dropdown-panel > a.dropdown-item::after {
    content: "";
    width: 15px;
    height: 15px;
    background: currentColor;
    -webkit-mask: var(--lisbon-arrow) center / contain no-repeat;
    mask: var(--lisbon-arrow) center / contain no-repeat;
}

.dropdown-item-icon { display: none; }

.nav-right { display: flex; align-items: center; gap: 20px; }

.nav-phone {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: inherit;
    font-family: var(--ocf-font-body), system-ui, sans-serif;
    font-size: calc(var(--font-body-size) * 1.03);
    font-weight: var(--font-weight-semibold);
    white-space: nowrap;
}

.nav-phone__icon { display: none; width: 18px; height: 18px; }
.nav-phone:hover { opacity: 0.75; }

.nav-right .nav-cta {
    min-height: 48px;
    padding: 12px 24px;
    white-space: nowrap;
}

.nav-mobile-btn {
    display: none;
    place-items: center;
    width: 48px;
    height: 48px;
    padding: 0;
    border: 0;
    border-radius: var(--radius-full);
    /* Over the photo: a solid heading-color circle with the white icon; on the solid bar: the alt surface, dark icon. */
    background: color-mix(in srgb, var(--ocf-bg-alt) var(--lisbon-nav-pct), var(--ocf-heading));
    color: inherit;
}

.nav-mobile-btn svg { width: 22px; height: 22px; }

.mobile-menu { display: none; }

/* Fit: assets/main.js adds .lisbon-nav-compact when the row overflows (long labels, wide customer fonts) — the phone
 * number shrinks to an icon — then .lisbon-nav-tight (CTA hidden), then .lisbon-nav-collapsed, which switches to the
 * menu button. The width breakpoints below are the no-JS fallback. */
.lisbon-nav-compact .nav-inner { gap: 16px; }
.lisbon-nav-compact .nav-links { gap: 18px; }
.lisbon-nav-compact .nav-phone__number { display: none; }
.lisbon-nav-compact .nav-phone__icon { display: block; }
.lisbon-nav-tight .nav-right .nav-cta { display: none; }

.lisbon-nav-collapsed .nav-links { display: none; }
.lisbon-nav-collapsed .nav-mobile-btn { display: inline-grid; }
.lisbon-nav-collapsed .nav-inner { justify-content: space-between; }
.lisbon-nav-collapsed .nav-right { gap: 10px; }
.lisbon-nav-collapsed .nav-phone { display: none; }

@media (max-width: 1080px) {
    .nav-inner { justify-content: space-between; gap: 12px; }
    .nav-logo { flex-basis: var(--ocf-logo-width-mobile); }
    .nav-logo-img { width: var(--ocf-logo-width-mobile); height: var(--ocf-logo-height-mobile); }
    .nav-links,
    .nav-phone,
    .nav-right .nav-cta { display: none; }
    .nav-right { gap: 10px; }
    .nav-mobile-btn { display: inline-grid; }
}

/* The open menu (base.js toggles an inline display) never shows while the full nav row is visible. */
@media (min-width: 1081px) {
    html:not(.lisbon-nav-collapsed) .mobile-menu { display: none !important; }
}

/* Mobile menu: drops down inside the pill, which grows into a rounded card. */
.mobile-menu.is-open,
.mobile-menu.open { display: block; }



.mobile-menu {
    max-height: calc(100dvh - var(--lisbon-bar-height) - var(--wp-admin-bar-offset, 0px));
    overflow-y: auto;
    overscroll-behavior: contain;
}

.mobile-menu-inner { padding: 4px var(--container-pad) 24px; }

.mobile-menu a,
.mobile-accordion-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 16px 0;
    border: 0;
    border-bottom: var(--card-border-width) solid var(--ocf-border);
    background: none;
    color: var(--ocf-heading);
    font-family: var(--ocf-font-heading), system-ui, sans-serif;
    font-size: clamp(1.15rem, 3.4vw, 1.375rem);
    font-weight: var(--ocf-font-h3-weight, 700);
    letter-spacing: var(--lisbon-h3-track);
    text-transform: none;
}

.mobile-menu svg { width: 20px; height: 20px; }
.mobile-accordion-panel { display: none; padding: 6px 0 10px; }

.mobile-accordion-panel a {
    padding: 10px 14px;
    border-bottom: 0;
    color: var(--ocf-body);
    font-family: var(--ocf-font-body), system-ui, sans-serif;
    font-size: var(--font-body-size);
    font-weight: var(--font-weight-medium);
    letter-spacing: 0;
}

.mobile-actions {
    display: grid;
    gap: 10px;
    margin-top: 20px;
}

.mobile-menu .mobile-cta,
.mobile-menu .mobile-phone {
    justify-content: center;
    gap: 8px;
    min-height: 52px;
    padding: 14px 24px;
    border: 0;
    border-radius: var(--radius-full);
    font-family: var(--ocf-font-body), system-ui, sans-serif;
    font-size: var(--font-button-size);
    font-weight: var(--font-weight-semibold);
    letter-spacing: 0;
}

.mobile-menu .mobile-cta { background: var(--ocf-primary); color: var(--ocf-primary-contrast); }
.mobile-menu .mobile-phone { border: 1.5px solid var(--ocf-heading); color: var(--ocf-heading); }
.mobile-phone-icon { display: inline-flex; color: var(--ocf-primary); }

@media (prefers-reduced-motion: reduce) {
    .nav-links .nav-link::after,
    .nav-links .nav-dropdown-trigger::after { transition: none; }
}

/* OCF_AGENT_BLOCK:header-external-profile-links START */
:root { --diner-profile-row-height: 40px; --lisbon-bar-height: calc(var(--ocf-header-height) + var(--diner-profile-row-height)); }
.nav-bar .nav-inner { min-height: var(--ocf-header-height); }
.nav-external-links { display: flex; align-items: center; justify-content: flex-end; height: var(--diner-profile-row-height); border-top: 1px solid color-mix(in srgb, currentColor 20%, transparent); }
.nav-external-links .diner-profile-links { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 4px 22px; margin: 0; padding: 0; list-style: none; }
.nav-external-links .diner-profile-links a { display: inline-flex; align-items: center; gap: 5px; min-height: 36px; color: inherit; font-family: var(--ocf-font-body), sans-serif; font-size: 13px; font-weight: 600; line-height: 1.2; text-decoration: none; white-space: nowrap; }
.nav-external-links .diner-profile-links a:hover { text-decoration: underline; text-underline-offset: 4px; }
.nav-external-links .diner-profile-links a:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; border-radius: 3px; }
.nav-external-links .diner-profile-links svg { flex: 0 0 12px; }
@media (max-width: 1080px) {
  :root { --lisbon-bar-height: calc(var(--ocf-header-height-mobile) + var(--diner-profile-row-height)); }
  .nav-bar .nav-inner { min-height: var(--ocf-header-height-mobile); }
}
@media (max-width: 639px) {
  :root { --diner-profile-row-height: 68px; }
  .nav-external-links { justify-content: flex-start; }
  .nav-external-links .diner-profile-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; gap: 0 8px; }
  .nav-external-links .diner-profile-links a { min-height: 32px; font-size: 12px; gap: 3px; }
}
/* OCF_AGENT_BLOCK:header-external-profile-links END */

/* OCF_AGENT_BLOCK:header-order-options START */
:root { --diner-profile-row-height: 52px; }
.nav-external-links .diner-profile-links { gap: 4px 18px; }
.nav-external-links .diner-profile-links li:nth-child(-n+2) a { min-height: 38px; padding: 8px 14px; border-radius: var(--ocf-button-radius, 999px); background: var(--ocf-primary); color: var(--ocf-primary-contrast, #fff); }
.nav-external-links .diner-profile-links li:nth-child(-n+2) a:hover { background: var(--ocf-primary-hover); text-decoration: none; }
@media (min-width: 640px) and (max-width: 1080px) {
  :root { --diner-profile-row-height: 96px; }
  .nav-external-links .diner-profile-links { justify-content: flex-start; gap: 4px 18px; }
}
@media (max-width: 639px) {
  :root { --diner-profile-row-height: 126px; }
  .nav-external-links .diner-profile-links { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 3px 8px; }
  .nav-external-links .diner-profile-links li { grid-column: span 2; }
  .nav-external-links .diner-profile-links li:nth-child(-n+2) { grid-column: span 3; }
  .nav-external-links .diner-profile-links li:nth-child(-n+2) a { width: 100%; justify-content: center; font-size: 13px; padding-inline: 8px; }
}
/* OCF_AGENT_BLOCK:header-order-options END */

/* OCF_AGENT_BLOCK:diner-colorful-header START */
/* Keep the photo visible behind the header. The base scroll treatment restores
   an opaque surface for the sticky header and an open mobile menu. */
.nav-bar { background: transparent; }
.nav-bar::after { opacity: 0; }
.nav-external-links {
  border-top-color: color-mix(in srgb, currentColor 20%, transparent);
}
.nav-external-links .diner-profile-links li:nth-child(-n+2) a {
  border: 2px solid var(--ocf-heading);
  border-radius: var(--button-radius);
  box-shadow: 2px 2px 0 var(--ocf-heading);
}
.nav-external-links .diner-profile-links li:nth-child(2) a {
  background: var(--ocf-secondary);
  color: var(--ocf-secondary-contrast);
}
.nav-external-links .diner-profile-links li:nth-child(2) a:hover {
  background: var(--ocf-secondary-hover);
}
.nav-links .nav-link::after,
.nav-links .nav-dropdown-trigger::after { background: var(--ocf-secondary); height: 3px; }
.nav-bar .nav-mobile-btn {
  border: 2px solid var(--ocf-heading);
  border-radius: 12px;
  background: var(--ocf-secondary);
  color: var(--ocf-secondary-contrast);
}
.nav-dropdown-panel {
  border: 2px solid var(--ocf-border);
  box-shadow: var(--card-shadow);
}
.mobile-menu .mobile-cta {
  border: 2px solid var(--ocf-heading);
  border-radius: var(--button-radius);
  box-shadow: var(--button-shadow);
}
@media (max-width: 639px) {
  .nav-external-links .diner-profile-links li:nth-child(-n+2) a { min-height: 38px; }
}
/* OCF_AGENT_BLOCK:diner-colorful-header END */

/* OCF_AGENT_BLOCK:header-social-logos START */
.nav-external-links .diner-profile-links { gap: 4px 12px; }
.nav-external-links .diner-profile-links .is-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  min-height: 40px;
  padding: 0;
  gap: 0;
  border-radius: 50%;
  transition: background var(--duration) var(--ease), transform var(--duration) var(--ease);
}
.nav-external-links .diner-profile-links .is-social .diner-profile-label { display: none; }
.nav-external-links .diner-profile-links .is-social svg {
  display: block;
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
}
.nav-external-links .diner-profile-links .is-social a:hover {
  background: color-mix(in srgb, currentColor 12%, transparent);
  transform: translateY(-1px);
  text-decoration: none;
}
.nav-external-links .diner-profile-links .is-social a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
  border-radius: 50%;
}
.ocf-footer-external-links .diner-profile-links .is-social svg {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
}
@media (min-width: 640px) and (max-width: 1080px) {
  .nav-external-links .diner-profile-links { justify-content: flex-end; gap: 4px 10px; }
}
@media (max-width: 639px) {
  :root { --diner-profile-row-height: 100px; }
  .nav-external-links { align-items: center; justify-content: center; }
  .nav-external-links .diner-profile-links {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 8px;
    width: 100%;
  }
  .nav-external-links .diner-profile-links li { flex: 0 0 auto; }
  .nav-external-links .diner-profile-links li:nth-child(-n+2) { flex: 0 0 calc(50% - 4px); }
  .nav-external-links .diner-profile-links li:nth-child(-n+2) a { width: 100%; }
  .nav-external-links .diner-profile-links .is-social a { width: 40px; height: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  .nav-external-links .diner-profile-links .is-social a { transition: none; }
  .nav-external-links .diner-profile-links .is-social a:hover { transform: none; }
}
/* OCF_AGENT_BLOCK:header-social-logos END */
