/*!
 * site-menu.css - mobile drawer for site_menu() (site_menu.inc)
 * Copyright 2026 - Onespot Web Integration
 *
 * Version 1.01.0  (11/11/2026)
 *
 * ChangeLog:
 * 1.01.0 11/11/2026 - mega menu panels (menu rebuild Phase 2), themed with
 *        --sm-mega-* variables on .sm-mega
 * 1.00.0 11/11/2026 - New (menu rebuild Phase 1).
 *
 * Theme it from the skin with the variables, e.g.
 *   .sm-drawer { --sm-bg: #fff; --sm-accent: #e2312d; --sm-font: 'Nunito', sans-serif; }
 * The defaults below have no specificity (:where), so the skin's rule always wins,
 * wherever its stylesheet loads.
 */
:where(.sm-drawer) {
    --sm-width: min(86vw, 340px);
    --sm-bg: #ffffff;
    --sm-color: #222222;
    --sm-muted: #777777;
    --sm-accent: #0a6ebd;
    --sm-current-bg: rgba(0, 0, 0, .04);
    --sm-border: rgba(0, 0, 0, .1);
    --sm-head-bg: var(--sm-bg);
    --sm-head-color: var(--sm-color);
    --sm-font: inherit;
    --sm-size: 16px;
    --sm-row: 48px;
    --sm-speed: .3s;
    --sm-overlay: rgba(0, 0, 0, .45);
    --sm-shadow: 0 0 24px rgba(0, 0, 0, .25);
}

html.sm-locked, html.sm-locked body { overflow: hidden; }

.sm-overlay {
    position: fixed; inset: 0; z-index: 2147482999;   /* above fixed skin headers (Kidventure's is 10000000) */
    background: var(--sm-overlay, rgba(0, 0, 0, .45));
    opacity: 0; transition: opacity .3s ease;
}
.sm-overlay.sm-is-open { opacity: 1; }
.sm-overlay[hidden], .sm-drawer[hidden] { display: none !important; }

.sm-drawer {
    position: fixed; top: 0; bottom: 0; left: 0; z-index: 2147483000;
    width: var(--sm-width); max-width: 100%;
    background: var(--sm-bg); color: var(--sm-color);
    font-family: var(--sm-font); font-size: var(--sm-size); line-height: 1.35;
    box-shadow: var(--sm-shadow);
    transform: translateX(-102%); transition: transform var(--sm-speed) ease;
    overflow: hidden; text-align: left;
}
.sm-drawer.sm-right { left: auto; right: 0; transform: translateX(102%); }
.sm-drawer.sm-is-open { transform: translateX(0); }
.sm-drawer *, .sm-drawer *::before, .sm-drawer *::after { box-sizing: border-box; }

.sm-wrap { position: absolute; inset: 0; overflow: hidden; }

.sm-panel {
    position: absolute; inset: 0;
    display: flex; flex-direction: column;
    background: var(--sm-bg);
    overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
}

/* Panels look: submenus slide in from the right, the parent moves partly off */
.sm-panels .sm-panel { transform: translateX(100%); visibility: hidden; transition: transform var(--sm-speed) ease, visibility 0s linear var(--sm-speed); }
.sm-panels .sm-panel.sm-panel-open { transform: translateX(0); visibility: visible; z-index: 2; transition: transform var(--sm-speed) ease, visibility 0s; }
.sm-panels .sm-panel.sm-panel-under { transform: translateX(-30%); visibility: visible; z-index: 1; }
.sm-drawer.sm-instant .sm-panel { transition: none !important; }

/* Header: back / title / close */
.sm-head {
    position: sticky; top: 0; z-index: 1; flex: 0 0 auto;
    display: flex; align-items: center; min-height: var(--sm-row);
    background: var(--sm-head-bg); color: var(--sm-head-color);
    border-bottom: 1px solid var(--sm-border);
}
.sm-title { flex: 1 1 auto; text-align: center; font-weight: 700; padding: 0 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sm-head-spacer, .sm-back, .sm-close { flex: 0 0 var(--sm-row); width: var(--sm-row); height: var(--sm-row); }
.sm-back, .sm-close, .sm-next, .sm-toggle {
    appearance: none; -webkit-appearance: none; margin: 0; padding: 0;
    background: none; border: 0; border-radius: 0; color: inherit; font: inherit; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
}
.sm-close span, .sm-close span::after { display: block; width: 18px; height: 2px; background: currentColor; transform: rotate(45deg); }
.sm-close span::after { content: ""; transform: rotate(-90deg); }
.sm-back span, .sm-arrow {
    display: block; width: 9px; height: 9px;
    border: solid currentColor; border-width: 0 0 2px 2px;
    transform: rotate(45deg); margin-left: 4px;
}
.sm-arrow { transform: rotate(-135deg); margin: 0 4px 0 0; }

/* The list */
.sm-drawer ul.sm-list { list-style: none; margin: 0; padding: 0; flex: 0 0 auto; }
.sm-drawer ul.sm-list li {
    position: relative; display: flex; flex-wrap: wrap; align-items: stretch;
    margin: 0; padding: 0; list-style: none; float: none; width: auto; height: auto; background: none;
    border-bottom: 1px solid var(--sm-border);
}
.sm-drawer ul.sm-list li::before, .sm-drawer ul.sm-list li::after { content: none; }
.sm-drawer .sm-link {
    flex: 1 1 0; min-width: 0; display: flex; align-items: center; min-height: var(--sm-row);
    padding: 10px 18px; color: inherit; text-decoration: none; background: none;
    font-weight: inherit; text-transform: none; letter-spacing: normal;
}
.sm-drawer .sm-link:hover, .sm-drawer .sm-link:focus-visible { color: var(--sm-accent); }
.sm-drawer li.Current > .sm-link { color: var(--sm-accent); background: var(--sm-current-bg); font-weight: 700; }
.sm-drawer li.Parent > .sm-link { color: var(--sm-accent); }

.sm-next, .sm-toggle { flex: 0 0 auto; min-width: var(--sm-row); padding: 0 14px; border-left: 1px solid var(--sm-border); gap: 8px; }
.sm-count { font-size: .8em; color: var(--sm-muted); }
.sm-next:hover, .sm-toggle:hover { color: var(--sm-accent); }

/* Accordion look */
.sm-accordion .sm-toggle .sm-arrow { transform: rotate(-45deg); margin: -4px 0 0; transition: transform .2s ease; }
.sm-accordion .sm-toggle[aria-expanded="true"] .sm-arrow { transform: rotate(135deg); margin: 4px 0 0; }
.sm-drawer ul.sm-sub { flex: 0 0 100%; list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--sm-border); background: var(--sm-current-bg); }
.sm-drawer ul.sm-sub[hidden] { display: none; }
.sm-drawer ul.sm-sub li:last-child { border-bottom: 0; }
.sm-drawer ul.sm-sub .sm-link { padding-left: 32px; font-size: .95em; }
.sm-drawer ul.sm-sub ul.sm-sub .sm-link { padding-left: 46px; }

.sm-drawer :focus-visible { outline: 2px solid var(--sm-accent); outline-offset: -2px; }

/* Menu button added when the skin has none */
.sm-button {
    display: none; flex-direction: column; justify-content: center; gap: 5px;
    width: 44px; height: 44px; padding: 10px; margin: 0;
    background: none; border: 0; cursor: pointer; color: inherit;
}
.sm-button span { display: block; height: 3px; border-radius: 2px; background: currentColor; }

@media (prefers-reduced-motion: reduce) {
    .sm-drawer, .sm-overlay, .sm-panel, .sm-arrow { transition: none !important; }
}

/* ------------------------------------------------------------------
   Mega menus (1.01.0). Theme from the skin, e.g.
   .sm-mega { --sm-mega-accent: #e2312d; --sm-mega-font: 'Nunito', sans-serif; }
   ------------------------------------------------------------------ */
:where(.sm-mega) {
    --sm-mega-max: 1140px;
    --sm-mega-bg: #ffffff;
    --sm-mega-color: #333333;
    --sm-mega-muted: #6b6b6b;
    --sm-mega-accent: #0a6ebd;
    --sm-mega-heading: #111111;
    --sm-mega-border: rgba(0, 0, 0, .08);
    --sm-mega-feature-bg: #f5f6f7;
    --sm-mega-font: inherit;
    --sm-mega-size: 15px;
    --sm-mega-pad: 28px;
    --sm-mega-gap: 28px;
    --sm-mega-radius: 0 0 8px 8px;
    --sm-mega-shadow: 0 14px 34px rgba(0, 0, 0, .16);
    --sm-mega-thumb: 4 / 3;
}

/* The menu item's own dropdown list is replaced by the panel (kept for the mobile drawer and for no-JS) */
html.sm-js .site-menu li.hasMega > ul { display: none !important; }

.sm-mega {
    display: none; position: fixed; z-index: 2147482000; left: 0; top: 0;
    box-sizing: border-box; max-width: calc(100vw - 32px);
    background: var(--sm-mega-bg); color: var(--sm-mega-color);
    font-family: var(--sm-mega-font); font-size: var(--sm-mega-size); line-height: 1.4;
    text-align: left; text-transform: none; letter-spacing: normal; font-weight: normal;
    border-top: 3px solid var(--sm-mega-accent); border-radius: var(--sm-mega-radius);
    box-shadow: var(--sm-mega-shadow);
}
.sm-mega.sm-mega-open { display: block; animation: sm-mega-in .16s ease-out; }
@keyframes sm-mega-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.sm-mega.sm-mega-w-item { width: max-content; min-width: 320px; }
.sm-mega *, .sm-mega *::before, .sm-mega *::after { box-sizing: border-box; }
.sm-mega p { height: auto; min-height: 0; padding: 0; margin: 0 0 12px; float: none; width: auto; line-height: inherit; }
.sm-mega ul, .sm-mega li { height: auto; float: none; }

.sm-mega-inner { display: flex; gap: var(--sm-mega-gap); padding: var(--sm-mega-pad); max-height: calc(100vh - 140px); overflow-y: auto; }
.sm-mega-feature-left .sm-mega-inner { flex-direction: row-reverse; }
.sm-mega-feature-bottom .sm-mega-inner { flex-direction: column; }

.sm-mega-columns {
    flex: 1 1 auto; min-width: 0;
    display: grid; grid-template-columns: repeat(var(--sm-mega-cols, 4), minmax(0, 1fr)); gap: 22px var(--sm-mega-gap);
    align-content: start;
}
.sm-mega-w-item .sm-mega-columns { grid-template-columns: repeat(var(--sm-mega-cols, 4), minmax(150px, 220px)); }
.sm-mega-col { min-width: 0; }

.sm-mega a { display: block; color: inherit; text-decoration: none; background: none; padding: 0; margin: 0; float: none; width: auto; height: auto; text-indent: 0; }
.sm-mega a::before, .sm-mega a::after { content: none; }
.sm-mega a:hover, .sm-mega a:focus-visible { color: var(--sm-mega-accent); }
.sm-mega a:focus-visible { outline: 2px solid var(--sm-mega-accent); outline-offset: 2px; }

.sm-mega-heading { font-weight: 700; color: var(--sm-mega-heading); padding: 0 0 6px !important; margin-bottom: 6px !important; border-bottom: 1px solid var(--sm-mega-border); }
.sm-mega-col.Current > .sm-mega-heading { color: var(--sm-mega-accent); }
.sm-mega-links a { padding: 4px 0 !important; color: var(--sm-mega-muted); font-size: .95em; }
.sm-mega-links a.Current { color: var(--sm-mega-accent); font-weight: 700; }
.sm-mega a.sm-mega-more { margin-top: 4px !important; font-size: .9em; font-weight: 700; color: var(--sm-mega-accent); }
.sm-mega a.sm-mega-more::after { content: " \203A"; }

.sm-mega-thumb { margin-bottom: 10px !important; border-radius: 6px; overflow: hidden; aspect-ratio: var(--sm-mega-thumb); background: var(--sm-mega-feature-bg); }
.sm-mega-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.sm-mega-thumb:hover img { transform: scale(1.04); }

/* Feature area */
.sm-mega-feature { flex: 0 0 300px; max-width: 34%; min-width: 0; padding: 20px; background: var(--sm-mega-feature-bg); border-radius: 6px; }
.sm-mega-feature-bottom .sm-mega-feature { flex: 0 0 auto; max-width: none; }
.sm-mega-feature img { max-width: 100%; height: auto; }
.sm-feature-heading, .sm-cta-heading { margin: 0 0 12px; font-weight: 700; font-size: 1.1em; color: var(--sm-mega-heading); }
.sm-cta-text { margin: 0 0 12px; }
.sm-cta-image { display: block; width: 100%; border-radius: 6px; margin-bottom: 12px; }
.sm-cta-phone a { font-weight: 700; font-size: 1.2em; color: var(--sm-mega-accent) !important; }
.sm-mega a.sm-btn {
    display: inline-block; padding: 10px 18px !important; border-radius: 6px;
    background: var(--sm-mega-accent); color: #fff !important; font-weight: 700;
}
.sm-mega a.sm-btn:hover { filter: brightness(1.1); color: #fff !important; }
.sm-cta > :last-child, .sm-mega-content > :last-child { margin-bottom: 0; }

.sm-cards { display: grid; gap: 14px; }
.sm-mega-feature-bottom .sm-cards { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.sm-mega a.sm-card { display: grid; grid-template-columns: 84px 1fr; grid-template-rows: auto 1fr; column-gap: 12px; align-items: start; }
.sm-mega a.sm-card img { grid-row: 1 / span 2; width: 84px; height: 64px; object-fit: cover; border-radius: 4px; }
.sm-mega a.sm-card:not(:has(img)) { grid-template-columns: 1fr; }
.sm-card-title { font-weight: 700; color: var(--sm-mega-heading); }
.sm-mega a.sm-card:hover .sm-card-title { color: var(--sm-mega-accent); }
.sm-card-meta { font-size: .85em; color: var(--sm-mega-muted); }
.sm-card-price { font-weight: 700; color: var(--sm-mega-accent); }
.sm-mega div.sm-card { display: grid; grid-template-columns: 84px 1fr; column-gap: 12px; }
.sm-mega div.sm-card:not(:has(img)) { grid-template-columns: 1fr; }
.sm-mega div.sm-card img { grid-row: 1 / span 2; width: 84px; height: 64px; object-fit: cover; border-radius: 4px; }
.sm-feature-more { margin: 14px 0 0; }
.sm-feature-more a { font-weight: 700; color: var(--sm-mega-accent) !important; }
.sm-feature-more a::after { content: " \203A"; }

@media (prefers-reduced-motion: reduce) {
    .sm-mega.sm-mega-open { animation: none; }
    .sm-mega-thumb img { transition: none; }
}
