/* Bottom Navigation Bar Styles */
:root {
    --bottom-nav-height: 65px;
    --fab-size: 56px;
    --nav-bg: rgba(255, 255, 255, 0.95);
    --nav-color: #6c757d;
    --nav-color-active: var(--primary-color, #4361ee);
    --nav-border: rgba(0, 0, 0, 0.08);
}

body.dark-mode {
    --nav-bg: rgba(26, 26, 46, 0.95);
    --nav-color: #a0a0b0;
    --nav-color-active: #4cc9f0;
    --nav-border: rgba(255, 255, 255, 0.1);
}

/* Base Container */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom, 0px));
    background: var(--nav-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--nav-border);
    z-index: 9999;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.05);
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

body.dark-mode .bottom-nav {
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.3);
}

/* Navigation Items */
.bottom-nav-items {
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: var(--bottom-nav-height);
    padding: 0;
    margin: 0;
    list-style: none;
    width: 100%;
}

.bottom-nav-items > li {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--nav-color);
    text-decoration: none;
    font-size: 11px;
    font-weight: 500;
    width: 100%;
    height: 100%;
    transition: all 0.3s ease;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.bottom-nav-item svg {
    width: 24px;
    height: 24px;
    margin-bottom: 4px;
    fill: currentColor;
    transition: transform 0.3s ease;
}

.bottom-nav-item:hover,
.bottom-nav-item:active {
    color: var(--nav-color-active);
}

.bottom-nav-item.active {
    color: var(--nav-color-active);
}

.bottom-nav-item.active svg {
    transform: translateY(-2px);
}

/* FAB Center Button */
.bottom-nav-item.fab {
    position: relative;
    top: -15px;
}

.bottom-nav-fab-btn {
    width: var(--fab-size);
    height: var(--fab-size);
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color, #4361ee), var(--secondary-color, #3a0ca3));
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 20px rgba(67, 97, 238, 0.3);
    color: white;
    margin-bottom: 25px; /* Push label down */
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

body.dark-mode .bottom-nav-fab-btn {
    box-shadow: 0 10px 20px rgba(76, 201, 240, 0.3);
    background: linear-gradient(135deg, #4cc9f0, #4361ee);
}

.bottom-nav-fab-btn svg {
    width: 28px;
    height: 28px;
    margin-bottom: 0;
    fill: white;
}

.bottom-nav-item.fab:hover .bottom-nav-fab-btn,
.bottom-nav-item.fab:active .bottom-nav-fab-btn {
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 12px 25px rgba(67, 97, 238, 0.4);
}

.bottom-nav-item.fab .fab-label {
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--nav-color);
    white-space: nowrap;
}

/* Mobile Menu Hamburger (Sliding Panel) */
.bottom-nav-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.bottom-nav-menu-overlay.show {
    opacity: 1;
    visibility: visible;
}

.bottom-nav-menu-panel {
    position: fixed;
    top: 100%; /* Start just below the viewport */
    left: 0;
    width: 100%;
    height: 100dvh; /* Cover the entire screen height */
    background: #ffffff;
    z-index: 9999;
    transition: transform 0.4s cubic-bezier(0.19, 1, 0.22, 1);
    display: flex;
    flex-direction: column;
}

body.dark-mode .bottom-nav-menu-panel {
    background: #1a1a2e;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.5);
}

.bottom-nav-menu-panel.show {
    transform: translateY(-100%);
}

.bottom-nav-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--nav-border);
}

.bottom-nav-menu-header h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
}

body.dark-mode .bottom-nav-menu-header h3 {
    color: #fff;
}

.bottom-nav-menu-close {
    background: none;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background-color: #f5f5f5;
    color: #666;
}

body.dark-mode .bottom-nav-menu-close {
    background-color: #2a2a3e;
    color: #ccc;
}

.bottom-nav-menu-content {
    padding: 10px 0;
    overflow-y: auto;
    padding-bottom: env(safe-area-inset-bottom, 20px);
}

.bottom-nav-menu-group {
    padding: 10px 20px;
}

.bottom-nav-menu-group-title {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #999;
    margin-bottom: 10px;
    padding-left: 10px;
    font-weight: 600;
}

.bottom-nav-menu-item {
    display: flex;
    align-items: center;
    padding: 12px 10px;
    color: #444;
    text-decoration: none;
    border-radius: 10px;
    transition: background 0.2s;
    font-weight: 500;
}

body.dark-mode .bottom-nav-menu-item {
    color: #ddd;
}

.bottom-nav-menu-item:hover,
.bottom-nav-menu-item:active {
    background: #f0f4f8;
    color: var(--primary-color, #4361ee);
}

body.dark-mode .bottom-nav-menu-item:hover,
body.dark-mode .bottom-nav-menu-item:active {
    background: rgba(255, 255, 255, 0.05);
    color: #4cc9f0;
}

.bottom-nav-menu-item svg {
    width: 20px;
    height: 20px;
    margin-right: 15px;
    fill: currentColor;
    opacity: 0.8;
}

.bottom-nav-menu-divider {
    height: 1px;
    background: var(--nav-border);
    margin: 10px 20px;
}

.bottom-nav-menu-item.danger {
    color: #e63946;
}

body.dark-mode .bottom-nav-menu-item.danger {
    color: #ff4d4d;
}

/* Profile specific styles for the menu */
.bottom-nav-user-info {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid var(--nav-border);
}

.bottom-nav-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color, #4361ee), var(--secondary-color, #3a0ca3));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
    margin-right: 15px;
    object-fit: cover;
}

.bottom-nav-user-details h4 {
    margin: 0;
    font-size: 15px;
    color: #333;
}

body.dark-mode .bottom-nav-user-details h4 {
    color: #fff;
}

.bottom-nav-user-details p {
    margin: 2px 0 0 0;
    font-size: 12px;
    color: #777;
    text-transform: capitalize;
}

body.dark-mode .bottom-nav-user-details p {
    color: #aaa;
}

/* Media Queries */
@media (max-width: 992px) {
    .bottom-nav {
        display: block;
    }

    /* Hide traditional desktop footers on mobile to prevent overlapping */
    footer, .footer {
        display: none !important;
    }
}

@media (max-width: 350px) {
    .bottom-nav-item {
        font-size: 10px;
    }
    .bottom-nav-fab-btn {
        width: 50px;
        height: 50px;
    }
}
