/* iOS Safari integration: a solid dark base matches the system safe area and
   gives Safari a consistent tab-bar tint when the browser allows website tinting.
   Web CSS cannot paint inside Safari's native browser toolbar. */
html { background-color: #0b2450; }

/* KidHeroArt — premium full-width navigation BASE.
   Fixed to the bottom edge of the viewport, on mobile and desktop.
   SVG icons and links remain in includes/site-bottom-nav.php (unchanged). */
.kh-bottom-nav,
.kh-bottom-nav * { box-sizing: border-box; }

.kh-bottom-nav {
    position: fixed;
    z-index: 1800;
    bottom: 0;
    left: 0;
    right: 0;
    transform: none;
    isolation: isolate;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 148px));
    justify-content: center;
    align-items: center;
    gap: clamp(4px, 1vw, 14px);
    width: 100%;
    max-width: none;
    min-height: 88px;
    margin: 0;
    padding: 8px max(14px, env(safe-area-inset-right, 0px)) calc(8px + env(safe-area-inset-bottom, 0px)) max(14px, env(safe-area-inset-left, 0px));
    border: 0;
    border-top: 1px solid rgba(255, 210, 110, .22);
    border-radius: 0;
    color: #eaf0ff;
    background: #0b2450;
    box-shadow: 0 -6px 28px rgba(7, 22, 48, .16);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}
.kh-bottom-nav::before {
    content: "";
    position: absolute;
    top: -1px;
    left: max(14px, calc(50% - 220px));
    right: max(14px, calc(50% - 220px));
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 209, 109, .85), transparent);
    pointer-events: none;
}
.kh-bottom-nav-link,
.kh-bottom-nav-link:visited {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    min-width: 0;
    min-height: 68px;
    padding: 4px 3px;
    border-radius: 13px;
    border: 1px solid transparent;
    color: #c4d1eb;
    background: transparent;
    text-align: center;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    transition: background .18s ease, border-color .18s ease, color .18s ease;
}
.kh-bottom-nav-symbol {
    display: grid;
    place-items: center;
    width: 37px;
    height: 37px;
    flex: 0 0 37px;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 12px;
    background: rgba(255, 255, 255, .065);
    color: #eaf0ff;
    transition: background .18s ease, box-shadow .18s ease, color .18s ease, border-color .18s ease;
}
.kh-bottom-nav-icon { display: block; width: 21px; height: 21px; }
.kh-bottom-nav-label {
    display: block;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: inherit;
    font-size: 10px;
    line-height: 1.25;
    font-weight: 850;
    letter-spacing: .015em;
}
.kh-bottom-nav-link:is(:hover, :focus-visible) {
    border-color: rgba(255, 207, 100, .25);
    background: rgba(255, 255, 255, .075);
    color: #fff;
}
.kh-bottom-nav-link:is(:hover, :focus-visible) .kh-bottom-nav-symbol {
    color: #102954;
    border-color: rgba(255, 219, 137, .45);
    background: linear-gradient(145deg, #ffe38f, #ffcc58);
    box-shadow: 0 4px 14px rgba(255, 202, 88, .20);
}
.kh-bottom-nav-link:focus-visible { outline: 2px solid #ffe18b; outline-offset: 2px; }
.kh-bottom-nav-link.is-current {
    color: #fff;
    background: rgba(255, 255, 255, .085);
    border-color: rgba(255, 255, 255, .10);
}
.kh-bottom-nav-link.is-current .kh-bottom-nav-symbol {
    color: #14294c;
    background: linear-gradient(145deg, #ffe9a2, #ffc94e);
    border-color: rgba(255, 255, 255, .20);
    box-shadow: 0 5px 16px rgba(255, 201, 83, .18);
}
/* KidHeroArt — anchored TOP navigation for every customer-facing page.
   Exactly the same SOLID #0b2450 background as the fixed bottom bar.
   The private Admin Studio is not affected. */
body.kh-has-bottom-nav {
    --kh-fixed-header-height: 96px;
    padding-top: calc(var(--kh-fixed-header-height) + env(safe-area-inset-top, 0px));
    scroll-padding-top: calc(var(--kh-fixed-header-height) + env(safe-area-inset-top, 0px) + 12px);
}
body.kh-has-bottom-nav .kh-global-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 2100;
    margin: 0;
    padding-top: env(safe-area-inset-top, 0px);
    background: #0b2450;
    border: 0;
    border-bottom: 1px solid rgba(255, 210, 110, .22);
    border-radius: 0;
    box-shadow: 0 5px 18px rgba(6, 18, 42, .16);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}
body.kh-has-bottom-nav .kh-global-brand,
body.kh-has-bottom-nav .kh-global-brand-copy strong { color: #fff; }
body.kh-has-bottom-nav .kh-global-brand-copy small { color: #b7c8e5; }
body.kh-has-bottom-nav .kh-global-menu-toggle {
    color: #fff;
    background: rgba(255,255,255,.075);
    border: 1px solid rgba(255,255,255,.20);
    box-shadow: none;
}
body.kh-has-bottom-nav .kh-global-menu-toggle span { background: #fff; }
body.kh-has-bottom-nav .kh-global-menu-toggle:hover {
    background: rgba(255,255,255,.13);
    border-color: rgba(255, 210, 110, .45);
    box-shadow: none;
}
body.kh-has-bottom-nav .kh-global-menu-toggle:focus-visible {
    outline: 2px solid #ffd267;
    outline-offset: 3px;
}
@media (max-width: 720px) {
    body.kh-has-bottom-nav { --kh-fixed-header-height: 78px; }
}

/* Every customer-facing page uses this navigation as the only bottom chrome.
   Reserve enough room for its fixed height + mobile home-indicator safe area. */
body.kh-has-bottom-nav {
    padding-bottom: calc(104px + env(safe-area-inset-bottom, 0px));
    scroll-padding-bottom: calc(112px + env(safe-area-inset-bottom, 0px));
}
.kh-has-bottom-nav #reviewCheckoutButton,
.kh-has-bottom-nav .review-account-card,
.kh-has-bottom-nav .kh-primary-cta,
.kh-has-bottom-nav .kh-open-order,
.kh-has-bottom-nav .payment-result-card {
    scroll-margin-bottom: calc(112px + env(safe-area-inset-bottom, 0px));
}
/* Private artwork lightboxes must cover the bottom bar while open. */
.kh-has-bottom-nav .kh-art-modal.open { z-index: 2001; }
@media print {
    .kh-bottom-nav { display: none !important; }
    body.kh-has-bottom-nav { padding-top: 0; padding-bottom: 0; }
    body.kh-has-bottom-nav .kh-global-header { position: relative; box-shadow: none; }
}


@media (max-width: 620px) {
    .kh-bottom-nav {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 2px;
        min-height: 82px;
        padding: 5px max(5px, env(safe-area-inset-right, 0px)) calc(5px + env(safe-area-inset-bottom, 0px)) max(5px, env(safe-area-inset-left, 0px));
    }
    .kh-bottom-nav-link { min-height: 69px; padding: 4px 1px; border-radius: 11px; }
    .kh-bottom-nav-symbol { width: 36px; height: 36px; flex-basis: 36px; border-radius: 11px; }
    .kh-bottom-nav-icon { width: 21px; height: 21px; }
    .kh-bottom-nav-label { font-size: 9.5px; letter-spacing: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .kh-bottom-nav-link, .kh-bottom-nav-symbol { transition: none; }
}

/* Customer-facing layout shared by Home, Hero Styles, checkout, library and legal pages.
   Keep the original footer markup/implementation intact, but do not display it.
   The fixed bottom navigation is the only bottom chrome on desktop and mobile. */
body.kh-has-bottom-nav footer.site-footer,
body.kh-has-bottom-nav footer.kh-site-footer {
  display: none !important;
}

/* On Hero Styles, move the existing selected-favorites summary *above* the
   permanent bottom navigation, so Review Favorites remains fully clickable. */
body.gallery-page-body.kh-has-bottom-nav .selection-bar {
  bottom: calc(103px + env(safe-area-inset-bottom, 0px));
}

/* Respect the reduced header height of the most compact mobile screens. */
@media (max-width: 420px) {
  body.kh-has-bottom-nav { --kh-fixed-header-height: 74px; }
}
@media (max-width: 620px) {
  body.gallery-page-body.kh-has-bottom-nav .selection-bar {
    bottom: calc(94px + env(safe-area-inset-bottom, 0px));
  }
}

/* The homepage uses intentionally oversized decorative orbits: clip only their
   horizontal overflow, without affecting vertical page scrolling. */
body.kh-has-bottom-nav:not(.lightbox-open) {
  overflow-x: clip;
}
/* The Hero Styles full-screen viewer must cover the fixed top and bottom menus. */
body.kh-has-bottom-nav .style-lightbox {
  z-index: 5000;
}

html { overflow-x: clip; }


/* A navigation label is functional text, including on 320px screens. */
.kh-bottom-nav-label { font-size: var(--kh-type-eyebrow, 11px); line-height: 1.25; }
@media (max-width: 620px) {
  .kh-bottom-nav-label { font-size: var(--kh-type-eyebrow, 11px); letter-spacing: 0; }
}
