/*
 * Cruise Menu Hub -- frontend styles.
 *
 * Colours and fonts come from the active theme's custom properties, each with
 * a literal fallback after the comma. Under the Scott's Cruises theme this
 * tracks whatever palette is set in the Customizer; under any other theme, or
 * with the theme disabled, the fallbacks keep it looking deliberate. A plugin
 * can't assume the variables exist, so every var() carries one.
 *
 * The sheet is a real file rather than an inline <style> block: the browser
 * caches it once site-wide, filemtime() versioning busts that cache on edit,
 * and Jetpack Boost can see it. Everything the shortcode renders is styled
 * from here -- no inline style attributes -- so a theme or child theme can
 * override any of it without reaching for !important.
 */

/* ---------- shell ---------- */
.cmh-menu-hub { width: 100%; max-width: 100%; margin: 0 auto; padding: 10px 0; font-size: 16px; color: var(--text-body, #2a3b48); box-sizing: border-box; }

/* ---------- feedback banner ---------- */
/* Was bright #fff3b0 in Arial -- the loudest thing on the page, in a typeface
   used nowhere else. Now the theme's card shape with a gold edge: still the
   first thing you notice, no longer shouting. */
.cmh-feedback { background: var(--sand, #faf9f6); border: 1px solid var(--border-strong, #d9d4c8); border-left: 4px solid var(--gold, #e8a05c); border-radius: 12px; padding: 14px 18px; margin: 16px 0; line-height: 1.5; }
.cmh-feedback-text { font-size: 15px; font-weight: 500; color: var(--text-body, #2a3b48); margin: 0; }

/* ---------- tabs ---------- */
/* The !importants stay: these are <button>s, and theme button styling would
   otherwise win on background, border, padding and colour. */
.cmh-tab-nav { display: flex; gap: 2px; margin-bottom: 24px; border-bottom: 1px solid var(--border, #eceae4); padding: 0; }
.cmh-tab-btn { appearance: none; -webkit-appearance: none; background: none !important; border: none !important; padding: 12px 20px !important; font: 600 13.5px var(--font-head, 'Space Grotesk', Georgia, serif) !important; color: var(--muted, #8a97a3) !important; cursor: pointer; border-bottom: 3px solid transparent !important; margin: 0 !important; margin-bottom: -1px !important; transition: color .15s ease, border-color .15s ease !important; box-shadow: none !important; text-decoration: none !important; }
.cmh-tab-btn:hover { color: var(--text-body, #2a3b48) !important; }
.cmh-tab-btn:focus-visible { outline: 2px solid var(--coral, #c9522f) !important; outline-offset: 2px; }
.cmh-tab-btn.cmh-tab-active { color: var(--navy, #0f2f4c) !important; border-bottom-color: var(--coral, #c9522f) !important; }
.cmh-type-section { display: none; }
.cmh-type-section.cmh-type-active { display: block; }

/* ---------- venue dropdown ---------- */
.cmh-dropdown-wrapper { background: #fff; border: 1px solid var(--border-strong, #d9d4c8); border-radius: 12px; padding: 18px 20px; margin-bottom: 26px; z-index: 1; position: relative; }
/* The theme's small-label idiom, shared with .tag and .sidebar-block-label. */
.cmh-dropdown-label { font: 700 11px var(--font-head, 'Space Grotesk', Georgia, serif); letter-spacing: .07em; text-transform: uppercase; color: var(--muted, #8a97a3); margin-bottom: 8px; display: block; }
.cmh-dropdown { padding: 12px 14px; font-size: 16px; width: 100%; border: 1.5px solid var(--border-strong, #d9d4c8); border-radius: 8px; background-color: #fff; color: var(--navy, #0f2f4c); font-weight: 500; cursor: pointer; box-sizing: border-box; transition: border-color .15s ease, box-shadow .15s ease; z-index: 1; }
.cmh-dropdown:hover { border-color: var(--coral, #c9522f); }
.cmh-dropdown:focus { outline: none; border-color: var(--coral, #c9522f); box-shadow: 0 0 0 3px rgba(201, 82, 47, .12); }

/* ---------- one menu ---------- */
.cmh-menu-section { margin-bottom: 0; z-index: 1; position: relative; }
/* At normal column widths, a true 16:9 box would be well over 150px tall, so
   max-height was winning against aspect-ratio and the box actually rendered
   at something like 5:1 -- far more panoramic than 16:9. object-fit: cover
   then had almost no vertical room to work with, so it kept only a thin
   center slice of the source photo and lost the actual subject. 240px gives
   cover a realistic amount of the frame to keep while still reading as a
   compact banner strip. */
.cmh-hero { margin-bottom: 10px; border-radius: 10px; overflow: hidden; width: 100%; aspect-ratio: 16/9; max-height: 240px; }
/* Interior/dining photos usually put their subject (tables, murals, people)
   in the lower two-thirds of the frame, with ceiling and lighting fixtures
   above -- so bias the crop down rather than taking dead center. */
.cmh-hero img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 65%; display: block; }
.cmh-menu-header { margin-bottom: 10px; }
.cmh-menu-header h2 { margin: 0; font-family: var(--font-head, 'Space Grotesk', Georgia, serif); font-size: 1.4rem; color: var(--navy, #0f2f4c); }
.cmh-menu-header p { margin: 0; color: var(--text-muted, #5b6a76); font-size: 0.95rem; }
.cmh-menu-desc { background: var(--sand, #faf9f6); border-left: 3px solid var(--coral, #c9522f); padding: 9px 13px; margin-bottom: 8px; border-radius: 6px; font-size: 0.9rem; line-height: 1.5; color: var(--text-body, #2a3b48); }
.cmh-available-ships { background: var(--sand-dark, #f2efe6); border-left: 3px solid var(--gold, #e8a05c); padding: 7px 11px; margin-bottom: 12px; border-radius: 6px; color: var(--text-body, #2a3b48); font-size: 0.85rem; line-height: 1.45; }

/* ---------- category accordions ---------- */
/* Same family as the theme's FAQ accordions: warm border, sand fill when
   open, bare coral marker -- rather than the cold blue box and filled navy
   circle this used to carry. */
.cmh-accordion-item { z-index: 1; position: relative; border: 1px solid var(--border-strong, #d9d4c8); border-radius: 10px; margin-bottom: 6px; overflow: hidden; }
.cmh-accordion-header { z-index: 1 !important; width: 100%; padding: 11px 14px; background: #fff; border: none; text-align: left; cursor: pointer; font: 600 14px var(--font-head, 'Space Grotesk', Georgia, serif); color: var(--navy, #0f2f4c); display: flex; justify-content: space-between; align-items: center; transition: background .15s ease; }
.cmh-accordion-header:hover { background: var(--sand, #faf9f6); }
.cmh-accordion-header:focus-visible { outline: 2px solid var(--coral, #c9522f); outline-offset: -2px; }
.cmh-accordion-label { flex: 1; }
.cmh-accordion-icon { display: inline-flex; align-items: center; justify-content: center; width: 18px; font: 400 19px var(--font-head, 'Space Grotesk', Georgia, serif); line-height: 1; color: var(--coral, #c9522f); flex-shrink: 0; margin-left: 10px; }
/* The marker is drawn here rather than baked into the markup, so it can
   reflect state. The old version printed a "+" and rotated it 90deg on open
   -- which for a "+" glyph looks identical, so the toggle never actually
   showed whether a panel was open or closed. */
.cmh-accordion-icon::before { content: "+"; }
.cmh-accordion-header.cmh-open .cmh-accordion-icon::before { content: "\2212"; }
.cmh-accordion-header.cmh-open { background: var(--sand, #faf9f6); }
.cmh-accordion-item:has(.cmh-accordion-header.cmh-open) { box-shadow: inset 3px 0 0 var(--coral, #c9522f); }
.cmh-accordion-content { z-index: 1 !important; max-height: 0; overflow: hidden; transition: max-height 0.3s ease; background: var(--sand, #faf9f6); }
.cmh-accordion-body { padding: 10px 14px; }

/* ---------- one menu item ---------- */
.cmh-item { margin-bottom: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--border, #eceae4); }
.cmh-item:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
.cmh-item-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 3px; }
.cmh-item-name { margin: 0; font-size: 0.92rem; color: var(--navy, #0f2f4c); font-weight: 600; }
.cmh-item-price { font-weight: 700; color: var(--navy, #0f2f4c); white-space: nowrap; font-size: 0.92rem; }
.cmh-item-desc { margin: 0; font-size: 0.85rem; color: var(--text-muted, #5b6a76); line-height: 1.45; }
.cmh-item-image { margin-top: 8px; text-align: center; }
/* The site theme forces `img { display: block }` sitewide, which takes the
   text-align above out of play -- a block element ignores its parent's
   text-align. Centering has to be asserted on the img itself so it doesn't
   depend on whatever else happens to be wrapping it on a given page. */
.cmh-item-image img { display: block; max-width: 100%; height: auto; max-height: 250px; border-radius: 6px; object-fit: cover; margin: 0 auto; }

/* ---------- pdf + images ---------- */
.cmh-pdf-wrapper { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border, #eceae4); }
/* Matches the theme's own buttons (.sc-comment-submit): navy, coral on hover. */
.cmh-pdf-download { display: inline-block; padding: 11px 18px; background: var(--navy, #0f2f4c); color: #fff; text-decoration: none; border-radius: 8px; font: 600 13px var(--font-head, 'Space Grotesk', Georgia, serif); transition: background .15s ease; }
/* The theme's `a:visited` rule outranks a single class selector, so once a
   visitor has actually followed this link, its navy `:visited` colour would
   otherwise beat the white text here and print navy-on-navy. */
.cmh-pdf-download:visited { color: #fff; }
.cmh-pdf-download:hover, .cmh-pdf-download:focus { background: var(--coral, #c9522f); color: #fff; }
.cmh-images-section { margin-top: 14px; }
.cmh-images-title { margin: 0 0 10px; font: 700 11px var(--font-head, 'Space Grotesk', Georgia, serif); letter-spacing: .07em; text-transform: uppercase; color: var(--muted, #8a97a3); }
.cmh-images-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 10px; }
.cmh-image-thumb { display: block; width: 100%; aspect-ratio: 3/4; background: var(--sand-dark, #f2efe6); border-radius: 8px; overflow: hidden; cursor: pointer; transition: transform .15s ease, border-color .15s ease; border: 1px solid var(--border-strong, #d9d4c8); }
.cmh-image-thumb:hover { transform: scale(1.04); border-color: var(--coral, #c9522f); }
.cmh-image-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- back to top ---------- */
/* One per menu, in .cmh-menu-foot. The hub used to append a second one right
   underneath the last menu's; that has been removed from the markup. The
   .cmh-back-to-top selector is kept alongside so any link still carrying the
   old class picks up the same shape rather than falling back to a bare link. */
.cmh-menu-foot { text-align: center; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border, #eceae4); }
.cmh-menu-foot a,
.cmh-back-to-top { display: inline-flex; align-items: center; padding: 8px 18px; border-radius: 999px; border: 1.5px solid var(--border-strong, #d9d4c8); background: #fff; color: var(--navy, #0f2f4c); text-decoration: none; font: 600 12.5px var(--font-head, 'Space Grotesk', Georgia, serif); transition: color .15s ease, border-color .15s ease; }
.cmh-menu-foot a:hover,
.cmh-back-to-top:hover { color: var(--coral, #c9522f); border-color: var(--coral, #c9522f); }
.cmh-divider { margin: 20px 0; border: none; border-top: 1px solid var(--border, #eceae4); }
/* The divider separates one menu from the next, so the last menu in a tab
   doesn't need one trailing off the end. Scoped to .cmh-menu-hub: a
   [cmh_single_menu] embed renders exactly one .cmh-menu-section outside that
   wrapper, so it's always "last of type" too -- without the scope this rule
   would strip its only divider and jam it straight into whatever follows. */
.cmh-menu-hub .cmh-menu-section:last-of-type .cmh-divider { display: none; }

/* ---------- image lightbox ---------- */
/* Driven by cmh-lightbox.js. <dialog> handles the focus trap, Esc and page
   inertness; these rules only cover appearance. */
.cmh-lightbox { border: none; padding: 0; background: transparent; width: 100%; height: 100%; max-width: 100vw; max-height: 100vh; overflow: hidden; }
.cmh-lightbox::backdrop { background: rgba(15, 47, 76, .9); }
.cmh-lb-figure { margin: 0; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 56px 20px 28px; }
.cmh-lb-figure img { max-width: 100%; max-height: calc(100vh - 110px); width: auto; height: auto; object-fit: contain; border-radius: 8px; background: #fff; display: block; }
.cmh-lb-figure figcaption { color: rgba(255, 255, 255, .8); font: 600 12px var(--font-head, 'Space Grotesk', Georgia, serif); letter-spacing: .08em; text-transform: uppercase; }
.cmh-lb-btn { position: absolute; display: flex; align-items: center; justify-content: center; padding: 0; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .35); background: rgba(255, 255, 255, .12); color: #fff; cursor: pointer; line-height: 1; transition: background .15s ease, border-color .15s ease; }
.cmh-lb-btn:hover { background: rgba(255, 255, 255, .24); border-color: rgba(255, 255, 255, .6); }
.cmh-lb-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.cmh-lb-btn[hidden] { display: none; }
.cmh-lb-close { top: 14px; right: 14px; width: 40px; height: 40px; font-size: 24px; }
.cmh-lb-prev, .cmh-lb-next { top: 50%; transform: translateY(-50%); width: 44px; height: 44px; font-size: 28px; }
.cmh-lb-prev { left: 14px; }
.cmh-lb-next { right: 14px; }
@media (max-width: 600px) {
	.cmh-lb-figure { padding: 52px 10px 22px; }
	.cmh-lb-prev, .cmh-lb-next { width: 38px; height: 38px; font-size: 24px; }
	.cmh-lb-prev { left: 6px; }
	.cmh-lb-next { right: 6px; }
}

/* ---------- misc ---------- */
.cmh-no-content { color: var(--muted, #8a97a3); font-style: italic; }

@media (max-width: 768px) {
	.cmh-menu-content { grid-template-columns: 1fr; }
	.cmh-dropdown { font-size: 16px; padding: 11px 13px; }
	.cmh-tab-btn { padding: 10px 14px !important; font-size: 12.5px !important; }
	.cmh-feedback { padding: 12px 15px; }
	.cmh-feedback-text { font-size: 14.5px; }
}
