/**
 * mobile-bar.css
 * Fixed bottom bar (Wishlist / Search / Cart(s)) for narrow screens — see
 * roomvo_mobile_bar_enabled() in functions.php. Hidden above 768px, where the
 * desktop header shows these controls itself.
 */

.rv-mobile-bar {
    display: none;
}

@media (max-width: 768px) {
    .rv-mobile-bar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 9990;
        display: flex;
        justify-content: space-around;
        align-items: stretch;
        padding-bottom: env(safe-area-inset-bottom, 0px);
        background: var(--rv-surface, #fff);
        border-top: 1px solid var(--rv-border, rgba(0, 0, 0, 0.12));
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.06);
    }

    /* Room for the bar so it never covers the footer's last line. */
    body {
        padding-bottom: calc(60px + env(safe-area-inset-bottom, 0px));
    }

    .rv-mobile-bar__item {
        flex: 1 1 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        min-height: 56px;
        padding: 6px 4px;
        margin: 0;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        color: var(--rv-text, #1e1f20);
        font-family: inherit;
        text-decoration: none;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }

    .rv-mobile-bar__item[hidden] {
        display: none;
    }

    .rv-mobile-bar__item:hover,
    .rv-mobile-bar__item:focus,
    .rv-mobile-bar__item:active {
        background: var(--rv-surface-soft, rgba(0, 0, 0, 0.04));
        color: var(--rv-text, #1e1f20);
        box-shadow: none;
    }

    .rv-mobile-bar__item:focus-visible {
        outline: 2px solid currentColor;
        outline-offset: -2px;
    }

    .rv-mobile-bar__icon {
        position: relative;
        display: inline-flex;
    }

    .rv-mobile-bar__label {
        font-size: 11px;
        font-weight: 500;
        line-height: 1.2;
    }

    /* Count badge (cart) and dot (samples), top-right of the icon. */
    .rv-mobile-bar__badge,
    .rv-mobile-bar .roomvo-wishlist-count {
        position: absolute;
        top: -6px;
        right: -10px;
        min-width: 16px;
        height: 16px;
        padding: 0 4px;
        box-sizing: border-box;
        border-radius: 999px;
        background: var(--rv-accent, #f95204);
        color: #fff;
        font-size: 10px;
        font-weight: 700;
        line-height: 16px;
        text-align: center;
    }

    .rv-mobile-bar__badge[hidden],
    .rv-mobile-bar .roomvo-wishlist-count.is-empty {
        display: none;
    }

    .rv-mobile-bar__badge--dot {
        top: -2px;
        right: -4px;
        min-width: 10px;
        width: 10px;
        height: 10px;
        padding: 0;
    }
}
