/* v693: context-aware customer branding. Every customer/public surface consumes one brand system,
   but text is automatically corrected when an administrator chooses a dark/light background combination
   that would otherwise be unreadable. No ordering/payment/table-session behavior is touched. */

/* Typography: remove old Georgia/legacy per-page font overrides. */
body.shop-page :is(h1,h2,h3,h4,h5,h6,p,a,button,input,select,textarea,label,strong,small,em),
body.public-page-v667 :is(h1,h2,h3,h4,h5,h6,p,a,button,input,select,textarea,label,strong,small,em),
body.reserve-v49 :is(h1,h2,h3,h4,h5,h6,p,a,button,input,select,textarea,label,strong,small,em),
body.customer-page-v115 :is(h1,h2,h3,h4,h5,h6,p,a,button,input,select,textarea,label,strong,small,em){
  font-family:var(--tt-font)!important;
}
body.shop-page,body.public-page-v667,body.reserve-v49,body.customer-page-v115{color:var(--tt-body-text-safe)!important}
body.shop-page :is(h1,h2,h3,h4,h5,h6),body.public-page-v667 :is(h1,h2,h3,h4,h5,h6),body.reserve-v49 :is(h1,h2,h3,h4,h5,h6),body.customer-page-v115 :is(h1,h2,h3,h4,h5,h6){color:var(--tt-heading-safe)!important}

/* Header: exact configured background, contrast-safe configured text. */
body.shop-page .shop-header,body.public-page-v667 .public-header-v662,.customer-page-v115 .customer-top-v115{
  background:var(--tt-header-bg)!important;color:var(--tt-header-text-safe)!important;
}
body.shop-page .shop-header :is(a,strong,span,small),body.public-page-v667 .public-header-v662 :is(a,strong,span,small),.customer-page-v115 .customer-top-v115 :is(a,strong,span,small){color:var(--tt-header-text-safe)!important}
html[data-tt-header-style="brand"] body.shop-page .shop-header,html[data-tt-header-style="brand"] body.public-page-v667 .public-header-v662{background:var(--tt-primary)!important}
html[data-tt-header-style="brand"] body.shop-page .shop-header :is(a,strong,span,small),html[data-tt-header-style="brand"] body.public-page-v667 .public-header-v662 :is(a,strong,span,small){color:var(--tt-on-primary-safe)!important}

/* Primary/secondary actions: one palette, with automatic readable foreground. */
body.shop-page :is(.btn.primary,.checkout-btn,.customer-category-open-v494,.customer-primary-action-v568,.customer-cart-checkout-v568,.primary-cta,.add-btn,.pwa-v321-btn),
body.public-page-v667 :is(.button,.order,.pwa-v321-btn),body.reserve-v49 #reserve-form-v49 button,
body.customer-page-v115 :is(.btn-v115,.customer-account-pill-v115.orange,.coupon-row-v121 button){
  background:var(--tt-primary)!important;color:var(--tt-on-primary-safe)!important;border-color:var(--tt-primary)!important;border-radius:var(--tt-button-radius)!important;
}
body.shop-page :is(.btn.secondary,.customer-category-count-v494),body.customer-page-v115 :is(.btn-soft-v115,.customer-account-pill-v115.light){
  background:var(--tt-secondary)!important;color:var(--tt-on-secondary-safe)!important;border-color:color-mix(in srgb,var(--tt-on-secondary-safe),transparent 75%)!important;border-radius:var(--tt-button-radius)!important;
}

/* Public hero is no longer an old brown/maroon gradient. It uses the configured primary brand color. */
body.public-page-v667 .public-hero-v662{
  background:var(--tt-primary)!important;color:var(--tt-on-primary-safe)!important;border-radius:var(--tt-card-radius)!important;
  box-shadow:0 18px 46px color-mix(in srgb,var(--tt-primary),transparent 78%)!important;
}
body.public-page-v667 .public-hero-v662 :is(h1,p,.eyebrow,a,strong,span){color:var(--tt-on-primary-safe)!important}

/* Cards: page text colors cannot be blindly reused on a different card background. */
body.public-page-v667 :is(.category-grid-v662>a,.menu-grid-v662 article,.item-detail-v662,.information-grid-v662>article,.information-grid-v662>aside,.popular-choices-v668,.seo-link-grid-v665>a),
body.shop-page :is(.customer-category-card-v494,.premium-food-card,.menu-card,.item-card,.checkout-card,.cart-card),
body.customer-page-v115 :is(.customer-card-v115,.metric-v115,.item-v115){
  background:var(--tt-card-bg)!important;color:var(--tt-card-text-safe)!important;border-color:color-mix(in srgb,var(--tt-card-text-safe),transparent 86%)!important;border-radius:var(--tt-card-radius)!important;
}
body.public-page-v667 :is(.category-grid-v662>a,.menu-grid-v662 article,.item-detail-v662,.information-grid-v662>article,.information-grid-v662>aside,.popular-choices-v668,.seo-link-grid-v665>a) :is(h1,h2,h3,h4,strong),
body.shop-page :is(.customer-category-card-v494,.premium-food-card,.menu-card,.item-card,.checkout-card,.cart-card) :is(h1,h2,h3,h4,strong),
body.customer-page-v115 :is(.customer-card-v115,.metric-v115,.item-v115) :is(h1,h2,h3,h4,strong){color:var(--tt-card-heading-safe)!important}
body.public-page-v667 .public-info-v671>article p,
body.public-page-v667 :is(.category-grid-v662 small,.menu-grid-v662 p,.popular-copy-v668 small,.seo-link-grid-v665 span),
body.shop-page :is(.customer-category-info-v494 small,.food-info>p),
body.customer-page-v115 :is(.muted-v115,.metric-v115 span){color:var(--tt-card-text-safe)!important;opacity:.76}
body.public-page-v667 :is(.information-grid-v662>article,.information-grid-v662>aside,.item-detail-v662,.category-grid-v662>a,.menu-grid-v662 article) a:not(.button),
body.shop-page :is(.customer-category-card-v494,.premium-food-card,.menu-card,.item-card,.checkout-card,.cart-card) a:not(.btn):not(.add-btn){color:var(--tt-card-link-safe)!important}
body.public-page-v667 .information-grid-v662>aside p,body.public-page-v667 .information-grid-v662>aside strong{color:var(--tt-card-text-safe)!important}
body.public-page-v667 .information-grid-v662>aside h2{color:var(--tt-card-heading-safe)!important}

/* Page-level links outside cards. */
body.public-page-v667 main>a,body.public-page-v667 main>.text-link,body.reserve-v49 .back-v49{color:var(--tt-link-safe)!important}

/* Footer: exact configured footer + safe foreground everywhere, including Arvika technology credit. */
body.shop-page .customer-public-footer-v662,body.public-page-v667 .public-footer-v662,body.reserve-v49 .reservation-public-footer-v692{
  background:var(--tt-footer-bg)!important;color:var(--tt-footer-text-safe)!important;
}
body.shop-page .customer-public-footer-v662 *,body.public-page-v667 .public-footer-v662 *,body.reserve-v49 .reservation-public-footer-v692 *{color:var(--tt-footer-text-safe)!important}
.customer-public-footer-v662 .technology-credit-v672,.public-footer-v662 .technology-credit-v672,.reservation-public-footer-v692 .technology-credit-v672{
  color:var(--tt-footer-text-safe)!important;border-color:color-mix(in srgb,var(--tt-footer-text-safe),transparent 74%)!important;background:color-mix(in srgb,var(--tt-footer-text-safe),transparent 92%)!important;
}
.customer-public-footer-v662 .technology-credit-v672 strong,.public-footer-v662 .technology-credit-v672 strong,.reservation-public-footer-v692 .technology-credit-v672 strong{color:var(--tt-footer-text-safe)!important}

/* Mobile app navigation is part of Branding, not a separate legacy palette. */
body.shop-page .mobile-bottom-nav-v132,body.public-page-v667 .mobile-bottom-nav-v132{
  background:var(--tt-card-bg)!important;color:var(--tt-card-text-safe)!important;border-color:color-mix(in srgb,var(--tt-card-text-safe),transparent 86%)!important;
}
body.shop-page .mobile-bottom-nav-v132 a,body.public-page-v667 .mobile-bottom-nav-v132 a{color:var(--tt-card-text-safe)!important;opacity:.74}
body.shop-page .mobile-bottom-nav-v132 .active-v132,body.public-page-v667 .mobile-bottom-nav-v132 .active-v132{
  background:color-mix(in srgb,var(--tt-primary),var(--tt-card-bg) 84%)!important;color:var(--tt-card-link-safe)!important;opacity:1;border-radius:var(--tt-button-radius)!important;
}

/* Floating customer install action must not remain green/orange from legacy styles. */
body.shop-page .pwa-v321-btn,body.public-page-v667 .pwa-v321-btn{background:var(--tt-primary)!important;color:var(--tt-on-primary-safe)!important;border-color:var(--tt-primary)!important}

/* Keep explicit styling modes, but never sacrifice contrast. */
html[data-tt-footer-style="soft"] body.shop-page .customer-public-footer-v662,
html[data-tt-footer-style="soft"] body.public-page-v667 .public-footer-v662,
html[data-tt-footer-style="soft"] body.reserve-v49 .reservation-public-footer-v692{background:color-mix(in srgb,var(--tt-footer-bg),var(--tt-page-bg) 16%)!important}
html[data-tt-footer-style="bordered"] body.reserve-v49 .reservation-public-footer-v692{background:var(--tt-page-bg)!important;color:var(--tt-body-text-safe)!important;border-top:5px solid var(--tt-footer-bg)!important}
html[data-tt-footer-style="bordered"] body.reserve-v49 .reservation-public-footer-v692 *{color:var(--tt-body-text-safe)!important}

@media(max-width:767px){
  body.public-page-v667 .information-grid-v662>article,body.public-page-v667 .information-grid-v662>aside{padding:20px!important}
  body.public-page-v667 .public-footer-v662{padding-bottom:calc(34px + var(--v132-nav-h,76px) + env(safe-area-inset-bottom,0px))!important}
}

/* Header links inherit header text, except the explicit primary Order action. */
body.public-page-v667 .public-header-v662 nav .order,
body.shop-page .shop-header :is(.primary-cta,.order-online,.header-order-button){color:var(--tt-on-primary-safe)!important}
