/* =============================================
   Bottom Navigation Bar — iOS/Material Style
   Dark mode via MudBlazor CSS vars
   ============================================= */

.bottom-nav-bar {
    position: fixed;
    inset: auto 0 0 0;
    height: 80px;
    background: var(--mud-palette-surface);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-top: 1px solid var(--mud-palette-lines-default);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    transition: background 0.3s ease, border-color 0.3s ease;
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    height: 100%;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--mud-palette-text-secondary);
    padding: 8px 4px;
    position: relative;
}

.nav-item:active {
    transform: scale(0.95);
}

.nav-item.active {
    color: var(--mud-palette-primary);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 32px;
    height: 3px;
    background: var(--mud-palette-primary);
    border-radius: 0 0 3px 3px;
}

.nav-label {
    font-size: 0.7rem;
    font-weight: 500;
    text-align: center;
}

/* FAB Button no centro */
.nav-item-fab {
    position: relative;
}

.fab-button {
    width: 56px;
    height: 56px;
    min-width: 56px;
    min-height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
    margin-bottom: 4px;
    transition: all 0.2s ease;
    flex-shrink: 0;
    aspect-ratio: 1 / 1;
}

.fab-button .mud-icon-root {
    color: white !important;
}

.nav-item-fab:active .fab-button {
    transform: scale(0.9);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.nav-item-fab .nav-label {
    color: var(--mud-palette-primary);
    font-weight: 600;
}

/* Content padding for bottom nav */
.content-with-bottom-nav {
    padding-bottom: 96px !important;
}

/* Sidebar FAB Button (Desktop) */
.sidebar-fab {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.35);
    transition: all 0.2s ease;
}

.sidebar-fab:hover {
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.5);
    transform: translateY(-1px);
}

.sidebar-fab:active {
    transform: scale(0.97);
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.3);
}

.sidebar-fab .mud-icon-root {
    color: white !important;
}

/* Responsive */
@media (min-width: 768px) {
    .bottom-nav-bar {
        display: none;
    }

    .content-with-bottom-nav {
        padding-bottom: 24px !important;
    }
}

/* Safe area support */
@supports (padding: max(0px)) {
    .bottom-nav-bar {
        padding-bottom: max(env(safe-area-inset-bottom), 0px);
        height: calc(80px + max(env(safe-area-inset-bottom), 0px));
    }
}

/* Hide text on very small screens */
@media (max-width: 360px) {
    .nav-label {
        font-size: 0.65rem;
    }
}

/* Mobile drawer fix */
@media (max-width: 767.98px) {
    .mud-drawer { display: none !important; }
    .mud-main-content { margin-left: 0 !important; }
    .bottom-nav-bar { margin-left: 0 !important; margin-right: 0 !important; }
}
