/* ==================================================
   Mobile bottom navigation bar ( includes/mobile-bottom-bar.php )
   Hidden above the tablet breakpoint; only takes effect on phones.
   ================================================== */
.pv-mbar,
.pv-mbar-backdrop,
.pv-mbar-sheet {
    display: none;
}

@media (max-width: 767.98px) {
    body.pv-has-mobile-bar {
        padding-bottom: calc(60px + env(safe-area-inset-bottom, 0px));
    }

    .pv-mbar {
        display: flex;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1030;
        align-items: stretch;
        justify-content: space-around;
        height: calc(58px + env(safe-area-inset-bottom, 0px));
        padding-bottom: env(safe-area-inset-bottom, 0px);
        background: #ffffff;
        border-top: 1px solid #eee1da;
        box-shadow: 0 -6px 20px rgba(15, 23, 42, 0.08);
    }

    .pv-mbar__item {
        display: flex;
        flex: 1 1 0;
        min-width: 0;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        padding: 0;
        border: 0;
        background: transparent;
        color: #7a6a63;
        font-family: inherit;
        text-decoration: none;
        cursor: pointer;
    }

    .pv-mbar__icon {
        display: flex;
        align-items: center;
        justify-content: center;
        height: 22px;
        font-size: 18px;
    }

    .pv-mbar__label {
        font-size: 10.5px;
        font-weight: 600;
        letter-spacing: 0.01em;
    }

    .pv-mbar__item.is-active,
    .pv-mbar__item.is-active .pv-mbar__icon {
        color: var(--ast-global-color-0, #ff6d59);
    }

    .pv-mbar__item.is-highlight .pv-mbar__icon {
        color: #b8860b;
    }

    .pv-mbar__item.is-highlight .pv-mbar__label {
        color: #b8860b;
        font-weight: 800;
    }

    .pv-mbar__avatar img {
        width: 24px;
        height: 24px;
        border-radius: 50%;
        object-fit: cover;
        border: 2px solid transparent;
    }

    .pv-mbar__account.is-active .pv-mbar__avatar img,
    .pv-mbar__account.is-active {
        color: var(--ast-global-color-0, #ff6d59);
    }

    .pv-mbar__account.is-active .pv-mbar__avatar img {
        border-color: var(--ast-global-color-0, #ff6d59);
    }

    /* --- account sheet --- */
    .pv-mbar-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 1035;
        background: rgba(15, 23, 42, 0.45);
        opacity: 0;
        transition: opacity 0.2s ease;
    }

    .pv-mbar-backdrop.is-open {
        opacity: 1;
    }

    .pv-mbar-sheet {
        display: block;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1040;
        max-height: 80vh;
        overflow-y: auto;
        padding: 10px 0 calc(14px + env(safe-area-inset-bottom, 0px));
        border-radius: 18px 18px 0 0;
        background: #ffffff;
        box-shadow: 0 -14px 34px rgba(15, 23, 42, 0.2);
        transform: translateY(100%);
        transition: transform 0.22s ease;
    }

    .pv-mbar-sheet.is-open {
        transform: translateY(0);
    }

    .pv-mbar-sheet__handle {
        width: 40px;
        height: 4px;
        margin: 2px auto 10px;
        border-radius: 999px;
        background: #eadfd7;
    }

    .pv-mbar-sheet__header {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 0 18px 14px;
        border-bottom: 1px solid #f1e6de;
    }

    .pv-mbar-sheet__avatar {
        width: 44px;
        height: 44px;
        border-radius: 50%;
        object-fit: cover;
        flex-shrink: 0;
    }

    .pv-mbar-sheet__who {
        display: flex;
        flex-direction: column;
        gap: 3px;
        min-width: 0;
        flex: 1;
    }

    .pv-mbar-sheet__who strong {
        overflow: hidden;
        color: #2d1002;
        font-size: 15px;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .pv-mbar-sheet__plan {
        display: flex;
        align-items: center;
        gap: 6px;
        color: #b8860b;
        font-size: 12px;
        font-weight: 700;
        text-decoration: none;
        width: fit-content;
    }

    .pv-mbar-sheet__plan-arrow {
        font-size: 9px;
        color: #c59b3a;
    }

    .pv-mbar-sheet__close {
        flex-shrink: 0;
        width: 30px;
        height: 30px;
        border: 0;
        border-radius: 50%;
        background: #f5efeb;
        color: #4f250f;
        font-size: 18px;
        line-height: 1;
        padding: 0;
    }

    .pv-mbar-sheet__list {
        margin: 6px 0 0;
        padding: 0;
        list-style: none;
    }

    .pv-mbar-sheet__list li a {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 13px 18px;
        color: #3a2313;
        font-size: 14px;
        font-weight: 600;
        text-decoration: none;
    }

    .pv-mbar-sheet__list li a i {
        width: 18px;
        color: var(--ast-global-color-0, #ff6d59);
        text-align: center;
        font-size: 15px;
    }

    .pv-mbar-sheet__list li a:active {
        background: #fbf3ee;
    }

    .pv-mbar-sheet__divider {
        height: 1px;
        margin: 6px 18px;
        background: #f1e6de;
    }

    .pv-mbar-sheet__logout {
        color: #b3261e !important;
    }

    .pv-mbar-sheet__logout i {
        color: #b3261e !important;
    }

    body.pv-mbar-sheet-open {
        overflow: hidden;
    }
}