/* ===== MOBILE TAB BAR ===== */

body.mobile-sheet-open {
    overflow: hidden;
}

.mobile-tab-bar {
    display: none; /* Hidden on desktop */
}

@media (max-width: 768px) {
    .mobile-tab-bar {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        min-height: 56px;
        padding-bottom: env(safe-area-inset-bottom, 0px);
        background: #fff;
        border-top: 1px solid var(--color-border, #dee2e6);
        z-index: var(--z-navbar, 300);
        justify-content: space-around;
        align-items: center;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.08);
    }

    /* Reserve space for tab bar + safe area */
    body {
        padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px));
    }

    /* Push booking bar above tab bar + safe area on tour_detail */
    #mobile-booking-bar {
        bottom: calc(56px + env(safe-area-inset-bottom, 0px)) !important;
    }

    /* Push floating cart above tab bar */
    .floating-cart {
        bottom: calc(80px + env(safe-area-inset-bottom, 0px));
    }

    /* Push toasts above tab bar */
    .toast-container {
        bottom: calc(72px + env(safe-area-inset-bottom, 0px));
    }

    /* Push back-to-top above floating cart + tab bar */
    .back-to-top {
        bottom: calc(130px + env(safe-area-inset-bottom, 0px));
    }
}

.tab-bar-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    height: 100%;
    min-width: 44px;
    padding: 4px 0;
    color: var(--color-text-muted, #6c757d);
    text-decoration: none;
    font-size: 0.65rem;
    font-weight: 500;
    background: none;
    border: none;
    cursor: pointer;
    position: relative;
    transition: color 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.tab-bar-item i {
    font-size: 1.15rem;
    margin-bottom: 2px;
}

.tab-bar-item.active {
    color: var(--color-valera, #4a90e2);
}

.tab-bar-item:active {
    color: var(--color-valera, #4a90e2);
}

/* Cart badge */
.tab-bar-badge {
    position: absolute;
    top: 2px;
    right: calc(50% - 16px);
    background: var(--color-danger, #dc3545);
    color: white;
    font-size: 0.6rem;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

/* ===== BOTTOM SHEET ===== */

.bottom-sheet-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: var(--z-overlay, 400);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.bottom-sheet-backdrop.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.bottom-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 16px 16px 0 0;
    z-index: var(--z-menu, 450);
    transform: translateY(100%);
    transition: transform 0.3s ease;
    max-height: 70vh;
    overflow-y: auto;
    padding-bottom: env(safe-area-inset-bottom, 0);
}

.bottom-sheet.open {
    transform: translateY(0);
}

.bottom-sheet-handle {
    width: 36px;
    height: 4px;
    background: var(--color-border, #dee2e6);
    border-radius: 2px;
    margin: 12px auto;
}

.bottom-sheet-content {
    padding: 0 16px 16px;
}

.bottom-sheet-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 8px;
    min-height: 44px;
    color: var(--color-text, #2c3e50);
    text-decoration: none;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.bottom-sheet-item:hover,
.bottom-sheet-item:active {
    background: var(--color-bg-light, #f8f9fa);
    color: var(--color-text, #2c3e50);
}

.bottom-sheet-item i {
    width: 24px;
    text-align: center;
    color: var(--color-valera, #4a90e2);
}

.bottom-sheet-divider {
    height: 1px;
    background: var(--color-border, #dee2e6);
    margin: 8px 0;
}

.bottom-sheet-socials {
    display: flex;
    gap: 16px;
    padding: 8px;
    justify-content: center;
}

.bottom-sheet-socials a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--color-bg-light, #f8f9fa);
    color: var(--color-text, #2c3e50);
    font-size: 1.2rem;
    transition: background 0.2s ease;
}

.bottom-sheet-socials a:hover {
    background: var(--color-border, #dee2e6);
}
