/* Small replica-specific accessibility and preview adjustments. */
:focus-visible { outline: 2px solid #c10207; outline-offset: 4px; }
.replica-form-status:empty { display: none; }
.replica-form-status:not(:empty) { padding: 16px; border: 1px solid #c10207; }
#loading-image[hidden] { display: none !important; }
.food-menus > div[id] { scroll-margin-top: 140px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* Phone/tablet layout overrides; original templates stay immutable for CMS edits. */
@media (max-width: 980px) {
  #masthead .site-header-main,
  #masthead .site-header-main.fixed-header { position: static; background: #000; padding: 12px 0; box-shadow: none; }
  #masthead .site-header-main > .site-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; width: calc(100% - 40px); margin: 0 20px; }
  #masthead .logo-container { float: none; margin: 0; text-align: left; }
  #masthead .logo-container .logo { display: block; width: 120px; max-width: 100%; }
  #masthead .logo-container .alt-logo { display: none; }
  #masthead .site-header-main > .site-inner::before, #masthead .site-header-main > .site-inner::after { display: none; }
  #masthead #menu-toggle { margin-left: auto !important; display: inline-flex; align-items: center; justify-content: center; min-height: 44px; margin: 0; padding: 10px 16px; background: transparent; border: 1px solid #777; color: #fff; font-size: 15px; }
  #masthead #site-header-menu { display: none !important; width: 100%; padding: 0; float: none; }
  #masthead #site-header-menu.toggled-on { display: block !important; }
  #masthead #site-navigation { display: block; margin: 0; padding: 8px 0 0; text-align: left; }
  #masthead .primary-menu { display: block; width: 100%; text-align: left; }
  #masthead .main-navigation li { display: block; width: 100%; }
  #masthead .main-navigation a { min-height: 44px; padding: 12px 8px; font-size: 14px; line-height: 1.5; color: #fff; white-space: normal; }
  #masthead .main-navigation .menu-item-has-children > a { padding-right: 32px; }
  #masthead .main-navigation ul ul { display: none !important; position: static; width: auto; margin: 0 0 8px; padding: 0 0 0 16px; background: #181818; box-shadow: none; }
  #masthead .main-navigation ul ul.toggled-on { display: block !important; }
  #masthead .main-navigation ul ul li { padding: 0; }
  #masthead .main-navigation .menu-item-has-children > a::after { right: 8px; top: 12px; }
}
@media (max-width: 768px) {
  body { overflow-wrap: break-word; }
  .home .et_pb_section_0 .et_pb_slide_content p { font-size: 18px; line-height: 1.65; }
  body.tax-tsma_location .print-btn { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 44px; }
  body.tax-tsma_location .print-btn::after { content: "Menu PDF"; font-size: 15px; }
  .site-inner { width: auto; margin-left: 20px; margin-right: 20px; }
  #primary h1, #primary .cms-latest-post h1 { font-size: 30px; line-height: 1.2; overflow-wrap: anywhere; }
  #primary h2, #primary h3 { font-size: 26px; line-height: 1.3; }
  #primary .latest-grid-post h2 { font-size: 24px; line-height: 1.35; }
  #primary .latest-grid-post { margin: 0; padding: 0; }
  #primary .latest-grid-post > .post { padding-bottom: 24px; }
  #primary .latest-grid-post .post-thumbnail img { width: 100%; height: auto; }
  .cms-latest-post { max-width: 100%; padding: 24px 0; }
  .cms-latest-post > a { display: inline-flex; align-items: center; min-height: 44px; }
  #primary .taxonomy-description h2 { font-size: 16px; line-height: 1.65; padding: 16px; margin: 16px 0; background: #f5f3ef; text-align: left; }
  body.tax-tsma_location #primary h1 { font-size: 30px; text-align: left; }
  body.tax-tsma_location .food-header-left, body.tax-tsma_location .food-header-right { float: none; width: 100%; }
  body.tax-tsma_location .food-service-container { display: block !important; }
  body.tax-tsma_location #primary .food-service-title { font-size: 26px; line-height: 1.3; }
  body.tax-tsma_location #toggle-food-service { display: none !important; }
  #food-service-list { display: flex !important; position: static; width: 100%; padding: 0; margin: 12px 0; gap: 8px; background: none; box-shadow: none; }
  #food-service-list li { flex: 1; list-style: none; margin: 0; padding: 0; }
  #food-service-list li a { display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 4px; font-size: 14px; line-height: 1.4; border: 1px solid #c8323a; color: #a32229; background: #fff; }
  #food-service-list a[aria-current="true"] { background: #c8323a; color: #fff; }
  body.tax-tsma_location #tsma_food_category { display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 8px; padding: 12px; scrollbar-width: thin; }
  body.tax-tsma_location #tsma_food_category li { flex-shrink: 0; padding: 0; }
  body.tax-tsma_location #tsma_food_category a { padding: 12px; background: #fff; font-size: 13px; min-height: 44px; white-space: nowrap; }
  body.tax-tsma_location #primary .food-menus h2 { font-size: 26px; }
  body.tax-tsma_location #primary .food-menus h3 { font-size: 22px; }
  body.tax-tsma_location #primary .food-menus h4,
  body.tax-tsma_location #primary .food-menus .menu-price { font-size: 17px; letter-spacing: 0; line-height: 1.5; }
  body.tax-tsma_location #primary .food-menus .menu-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-right: 0; background: none; }
  body.tax-tsma_location #primary .food-menus .menu-title-left { min-width: 0; box-shadow: none; }
  body.tax-tsma_location #primary .food-menus .menu-price { position: static; flex-shrink: 0; max-width: 40%; padding: 0; text-align: right; }
  .food-menus > div[id] { scroll-margin-top: 20px; }
  input[type="text"],input[type="email"],input[type="tel"],input[type="search"],textarea,select { font-size: 16px; min-height: 44px; }
  .form label.half-width { width: 100%; padding-right: 0; }
  .form input[type="submit"], .pagination .page-numbers, .latest_permalink { min-height: 44px; padding: 12px 16px; }
  .pagination .nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; }
  #colophon a[href^="tel:"], #colophon a[href^="/contact-us"] { display: inline-block; min-height: 44px; padding: 10px 0; }
}

/* Keep the actual dine-in PDF inside the mobile restaurant page. */
.dine-in-pdf[hidden] { display: none; }
.takeout-category-picker, .takeout-menu-notes > summary { display: none; }
@media (max-width: 768px) {
  .mobile-dine-in-pdf .menu-main-content,
  .mobile-dine-in-pdf .food-header-right { display: none; }
  .mobile-dine-in-pdf .page-header { margin-bottom: 0 !important; }
  .dine-in-pdf { width: 100%; min-width: 0; padding-bottom: 24px; scroll-margin-top: 16px; }
  .dine-in-pdf > p { margin: 0; text-align: right; }
  .dine-in-pdf > p a { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 0; font-size: 14px; }
  .dine-in-pdf iframe { display: block; width: 100%; height: 80vh; height: 80dvh; min-height: 480px; border: 1px solid #ddd; background: #f4f4f4; }
}

/* Take Out: compact actions, persistent category access, and readable dish rows. */
@media (max-width: 768px) {
  body.takeout-menu #primary .page-header { padding: 12px 0 20px; margin-bottom: 0; }
  body.takeout-menu #primary .taxonomy-description h2 { font-size: 14px; line-height: 1.55; padding: 12px; border-left: 3px solid #c8323a; }
  body.takeout-menu #primary h2.food-service-title { font-size: 24px; text-align: left; margin: 16px 0 8px; }
  body.takeout-menu .food-header-right { display: flex; gap: 12px; align-items: stretch; margin: 16px 0 0; }
  body.takeout-menu .food-header-right .btn-red { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; margin: 0; padding: 12px; background: #b52c34; border: 1px solid #b52c34; box-shadow: none; border-radius: 0; font-size: 15px; line-height: 1.4; }
  body.takeout-menu .food-header-right .order-online { flex: 1; min-width: 0; background: #b52c34 !important; }
  body.takeout-menu .food-header-right .print-btn { background: #fff !important; color: #a32229 !important; gap: 0; }
  body.takeout-menu .food-header-right .btn-red:hover { filter: brightness(.95); }
  body.takeout-menu .print-btn img { display: none; }
  body.takeout-menu .menu-main-content { display: flow-root; }
  body.takeout-menu .takeout-category-picker { display: block; position: sticky; top: 0; z-index: 20; padding: 12px 0; background: #fff; border-bottom: 1px solid #dedbd7; }
  .takeout-category-picker label { display: block; margin-bottom: 4px; color: #555; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
  .takeout-category-picker select { width: 100%; max-width: 100%; min-height: 48px; margin: 0; padding: 10px 12px; border: 1px solid #b9b5af; border-radius: 0; background: #fff; color: #333; font-size: 16px; }
  body.takeout-menu .food-categories { display: none; }
  body.takeout-menu .menu-sidebar, body.takeout-menu .food-menus { float: none; width: 100%; padding: 0 !important; }
  body.takeout-menu .menu-sidebar-content { position: static !important; width: auto !important; }
  body.takeout-menu .food-legend { margin: 16px 0; text-align: left; }
  body.takeout-menu .food-legend p { text-align: left; font-size: 14px; line-height: 1.6; margin: 0 0 12px; }
  body.takeout-menu .food-legend img { width: 22px; height: 22px; }
  body.takeout-menu .takeout-menu-notes > summary { display: list-item; cursor: pointer; padding: 12px 0; min-height: 44px; font-size: 14px; color: #a32229; }
  body.takeout-menu .takeout-menu-notes { margin: 0; }
  body.takeout-menu .takeout-menu-notes p, body.takeout-menu .takeout-menu-notes p span { font-size: 14px !important; }
  body.takeout-menu .fee-message { font-size: 13px; line-height: 1.5; text-align: left; margin: 8px 0 0; padding: 0; }
  body.takeout-menu .food-menus > div[id] { scroll-margin-top: 104px; }
  body.takeout-menu #primary .food-menus .menu-section-title { margin: 8px 0 0; padding-bottom: 10px; }
  body.takeout-menu #primary .food-menus h2 { font-size: 24px; letter-spacing: 0; padding-top: 12px; }
  body.takeout-menu #primary .food-menus h3 { font-size: 19px; letter-spacing: 0; margin: 12px 0; }
  body.takeout-menu #primary .food-menu { padding: 14px 0; border-bottom: 1px solid #e9e6e1; }
  body.takeout-menu #primary .food-menus .menu-title { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; margin: 0; align-items: baseline; }
  body.takeout-menu #primary .food-menus .menu-title-left { padding: 0; }
  body.takeout-menu #primary .food-menus h4 { font-size: 16px; line-height: 1.5; font-weight: 600; }
  body.takeout-menu #primary .food-menus .menu-price { font-size: 16px; line-height: 1.5; font-variant-numeric: tabular-nums; max-width: none; white-space: nowrap; color: #a32229; }
  body.takeout-menu #primary .food-menus p { font-size: 14px; line-height: 1.6; padding: 0; }
  body.takeout-menu #primary .food-menu p { display: inline-block; margin: 6px 0 0; color: #62605d; }
  body.takeout-menu #primary .food-menus img { width: 20px; height: 20px; }
}

/* In-page PDF menu viewer for mobile specials and menu PDF links. */
body.mobile-pdf-open { overflow: hidden; }
.mobile-pdf-viewer { padding: 0; border: 0; border-radius: 8px; width: calc(100% - 16px); max-width: 768px; height: 94vh; height: 94dvh; max-height: calc(100dvh - 16px); background: #fff; color: #333; overflow: hidden; }
.mobile-pdf-viewer[open] { display: flex; flex-direction: column; }
.mobile-pdf-viewer::backdrop { background: rgba(0,0,0,.65); }
.mobile-pdf-viewer > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid #ddd; }
.mobile-pdf-viewer > header h2 { margin: 0; font-size: 16px; line-height: 1.4; font-weight: 700; }
.mobile-pdf-viewer > header button { flex-shrink: 0; min-height: 44px; padding: 8px 12px; border: 1px solid #b52c34; background: #fff; color: #a32229; font-size: 14px; border-radius: 4px; cursor: pointer; }
.mobile-pdf-viewer > p { margin: 0; padding: 0 16px; text-align: right; }
.mobile-pdf-viewer > p a { display: inline-flex; align-items: center; min-height: 44px; font-size: 13px; color: #a32229; }
.mobile-pdf-viewer iframe { display: block; width: 100%; flex: 1; min-height: 0; border: 0; background: #eee; }
