/*
 * Bottom Bar Navigation
 *
 * @package     iw-foundation-theme
 * @subpackage  styles
 * @since       1.3.0
 * ------------------------------------------------------ */


/* --- Hide header areas on mobile (keep .iw_mobile_navigation visible) --- */

.iw-mobile.iw-mobile-nav-bottom-bar .iw_header_info_area,
.iw-mobile.iw-mobile-nav-bottom-bar .iw_header_content_area,
.iw-mobile.iw-mobile-nav-bottom-bar .iw_header_search_area {
    display: none;
}

.iw-mobile.iw-mobile-nav-bottom-bar .iw-body-widgets-wrapper .iw_mobile_navigation_buttons {
    display: none;
}


/*
 * Bottom-bar toggle buttons: 36x36 wrapper, both buttons overlap
 * pixel-exact via `position: absolute; inset: 0`. SVG icon 21x21
 * centered via flex. `transform: translateZ(0)` puts both buttons on
 * the same GPU compositing layer — without it iOS Safari subpixel-
 * rounds each button independently and one ends up 1-2 px offset
 * from the other during the opacity transition.
 *
 * Overrides Basic.css's `button.iw_icon_button { 64x64; padding: 20px }`
 * and Navigation.css's `right: 50px` / `top: 19px` (which only make
 * sense in the header context).
 *
 * @since 1.3.0
 */
.iw-mobile.iw-mobile-nav-bottom-bar .iw_mobile_navigation_buttons {
    position: relative;
    width: 36px;
    height: 36px;
}

.iw-mobile.iw-mobile-nav-bottom-bar .iw_mobile_navigation_buttons .iw_mobile_navigation_button {
    position: absolute;
    inset: 0;
    width: 36px;
    height: 36px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateZ(0);
}

.iw-mobile.iw-mobile-nav-bottom-bar .iw_mobile_navigation_buttons .iw_mobile_navigation_button svg {
    width: 21px;
    height: 21px;
}


/* --- Top Logo (centered, overlaying content) --- */

.iw_bottom_bar_top_logo {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: none;
    justify-content: center;
    padding: 20px;
    pointer-events: none;
}

.iw-mobile .iw_bottom_bar_top_logo {
    display: flex;
}

.iw_bottom_bar_top_logo .iw-widget {
    pointer-events: auto;
}


/* --- Fixed Bottom Bar --- */

.iw_bottom_bar {
    position: fixed;
    width: 100%;
    bottom: 0;
    z-index: 10001;
    display: none;
}

.iw-mobile .iw_bottom_bar {
    display: block;
}

.iw_bottom_bar_content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 17px;
    padding-bottom: calc(17px + env(safe-area-inset-bottom, 0px));
    background: var(--iw-color-primary, #EF17EF);
}



/* --- Mobile navigation background variable --- */

.iw-mobile-nav-bottom-bar .iw_mobile_navigation {
    --iw-mobile-nav-bg: var(--iw-color-tertiary, #EFEF17);
}


/* --- Menu Info Area (above the menu items in the open sheet) --- */

.iw_bottom_bar_menu_info_area {
    display: none;
}

.iw_mobile_navigation .iw_bottom_bar_menu_info_area {
    display: block;
    flex-shrink: 0;
    background: var(--iw-mobile-nav-bg);
}


/* --- Mobile navigation (inside bottom bar, hidden state) --- */

.iw_bottom_bar .iw_mobile_navigation {
    z-index: -1;
    top: 0;
    transition: transform 1s cubic-bezier(0, 0, 0, 1);
    transform: translateY(100%);
    background: transparent;
    overflow: hidden;
}

.iw_bottom_bar .iw_mobile_navigation::before {
    content: '';
    display: block;
    height: 15dvh;
    flex-shrink: 0;
}

.iw_bottom_bar .iw_mobile_navigation > .iw_navigation {
    min-height: 85dvh;
    background: var(--iw-mobile-nav-bg);
}


/* --- Mobile navigation overlay (extracted to body level) --- */

.iw_mobile_navigation.iw_mobile_nav_overlay {
    position: absolute !important;
    left: 0;
    width: 100%;
    height: var(--iw-sheet-h, 100dvh);
    z-index: 10000;
    overflow: visible;
    clip-path: inset(0 0 0 0);
    background: transparent;
    transform: translateY(100%);
    transition: transform 1s cubic-bezier(0, 0, 0, 1);
}

.iw_mobile_navigation.iw_mobile_nav_overlay.iw_mobile_nav_expanded {
    clip-path: none;
    transform: translateY(0);
}

.iw-mobile-nav-bottom-bar-standard .iw_mobile_navigation.iw_mobile_nav_overlay {
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.iw-mobile-nav-bottom-bar-standard .iw_mobile_navigation.iw_mobile_nav_overlay > .iw_navigation {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.iw_mobile_navigation.iw_mobile_nav_overlay::before {
    content: '';
    display: block;
    height: calc(0.15 * var(--iw-sheet-h, 100dvh));
    flex-shrink: 0;
}

.iw_mobile_navigation.iw_mobile_nav_overlay > .iw_navigation {
    min-height: calc(0.85 * var(--iw-sheet-h, 100dvh));
    background: var(--iw-mobile-nav-bg);
}
