/* Minimal Material Design CSS for Inventory App */

/* Material Color Variables */
:root {
    --mdb-primary: #1976D2;
    --mdb-dark: #212121;
    --mdb-light: #F5F5F5;
}

body {
    font-family: 'Roboto', 'Segoe UI', sans-serif;
    background-color: var(--mdb-light);
}

/* Header Styles */
.mdb-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
}

.navbar {
    min-height: 48px;
    padding: 0.25rem 0.5rem;
}

.navbar .container-fluid {
    align-items: center;
}

.navbar .btn-link {
    padding: 0.25rem 0.5rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    min-width: 40px;
}

.navbar .btn-link i {
    vertical-align: middle;
}

.navbar .btn-link:hover {
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

.navbar .btn-link:focus {
    box-shadow: none;
}

.navbar .dropdown-toggle {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
}

.navbar .dropdown-toggle:hover {
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

.navbar-brand {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0.25rem 0.5rem;
}

/* Sidebar Styles - Desktop Only */
.sidebar {
    position: fixed;
    top: 48px;
    left: 0;
    bottom: 0;
    width: 250px;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 1020;
    background-color: var(--mdb-dark);
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.15);
    transition: width 0.3s ease, box-shadow 0.3s ease;
}

.sidebar.collapsed {
    width: 60px;
}

/* Custom scrollbar for sidebar */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Nav section titles */
.sidebar .nav-section-title {
    padding: 1rem 1rem 0.5rem 1rem;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
}

.sidebar.collapsed .nav-section-title {
    justify-content: center;
}

.sidebar.collapsed .nav-section-title span {
    display: none;
}

.sidebar.collapsed .nav-section-title i {
    margin-right: 0;
}

/* Nav links */
.sidebar .nav-link {
    color: rgba(255, 255, 255, 0.85);
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    min-height: 48px;
    text-decoration: none;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    margin: 2px 0;
}

.sidebar .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.08);
    color: #fff;
    border-left-color: rgba(25, 118, 210, 0.5);
}

.sidebar .nav-link.active {
    background-color: rgba(25, 118, 210, 0.25);
    color: #fff;
    border-left-color: var(--mdb-primary);
}

.sidebar .nav-link i {
    margin-right: 1rem;
    font-size: 1.25rem;
    min-width: 24px;
    text-align: center;
}

.sidebar.collapsed .nav-link {
    justify-content: center;
    padding: 0.75rem 0.5rem;
}

.sidebar.collapsed .nav-link span {
    display: none;
}

.sidebar.collapsed .nav-link i {
    margin-right: 0;
}

/* Main Content */
.main-content {
    margin-top: 48px;
    margin-left: 250px;
    min-height: calc(100vh - 48px);
    padding-bottom: 0;
    transition: margin-left 0.3s ease;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.main-content.sidebar-collapsed {
    margin-left: 60px;
}

.main-content > .container-fluid {
    flex: 1;
}

/* Footer */
.footer {
    margin-left: 250px;
    transition: margin-left 0.3s ease;
}

.footer.sidebar-collapsed {
    margin-left: 60px;
}

/* Mobile Bottom Navigation */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1025;
    background-color: white;
    box-shadow: 0 -2px 4px rgba(0,0,0,0.1);
    border-top: 1px solid rgba(0,0,0,0.12);
}

.bottom-nav-container {
    display: flex;
    justify-content: space-around;
    height: 56px;
}

.bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: rgba(0, 0, 0, 0.6);
    min-height: 48px;
    border: none;
    background: none;
    cursor: pointer;
}

.bottom-nav-item i {
    font-size: 24px;
}

.bottom-nav-item span {
    font-size: 0.75rem;
}

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

/* Mobile-Friendly Table Cards */
.mobile-card-list {
    display: none;
}

@media (max-width: 767.98px) {
    /* Hide tables on mobile, show cards instead */
    .table-responsive {
        display: none !important;
    }

    .mobile-card-list {
        display: block;
    }

    .mobile-card-item {
        background: white;
        border: 1px solid rgba(0, 0, 0, 0.125);
        border-radius: 4px;
        padding: 1rem;
        margin-bottom: 1rem;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    }

    .mobile-card-item .card-title {
        font-size: 1.1rem;
        font-weight: 500;
        margin-bottom: 0.75rem;
        color: var(--mdb-primary);
    }

    .mobile-card-item .card-field {
        display: flex;
        justify-content: space-between;
        padding: 0.5rem 0;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }

    .mobile-card-item .card-field:last-of-type {
        border-bottom: none;
    }

    .mobile-card-item .field-label {
        font-weight: 500;
        color: #666;
        font-size: 0.9rem;
    }

    .mobile-card-item .field-value {
        font-weight: 400;
        text-align: right;
    }

    .mobile-card-item .card-actions {
        margin-top: 1rem;
        padding-top: 0.75rem;
        border-top: 2px solid rgba(0, 0, 0, 0.1);
        display: flex;
        gap: 0.5rem;
        justify-content: flex-end;
    }

    .mobile-card-item .btn-sm {
        min-height: 44px;
        min-width: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0.5rem;
    }

    .mobile-card-item .btn-sm i {
        margin: 0;
    }
}

/* Language Switcher */
.language-switcher {
    position: relative;
}

.language-switcher .btn {
    font-size: 0.875rem;
    padding: 0.25rem 0.5rem;
}

.language-switcher .dropdown-menu {
    min-width: 150px;
    position: absolute !important;
    top: 100% !important;
    left: auto !important;
    right: 0 !important;
    transform: none !important;
    margin-top: 0.25rem;
}

@media (max-width: 767.98px) {
    .language-switcher .btn {
        font-size: 0.75rem;
        padding: 0.2rem 0.4rem;
        white-space: nowrap;
    }

    .language-switcher .btn span {
        display: none;
    }

    .language-switcher .btn i {
        font-size: 1.25rem;
    }
}

/* Mobile Styles */
@media (max-width: 767.98px) {
    /* Hide sidebar completely on mobile */
    .sidebar {
        display: none !important;
    }

    /* Adjust main content for mobile */
    .main-content {
        margin-left: 0;
        width: 100%;
        padding-bottom: 72px; /* Space for bottom nav */
    }

    .footer {
        margin-left: 0;
        margin-bottom: 56px;
    }

    /* Hide mobile menu toggle (not needed with bottom nav) */
    #mobileMenuToggle {
        display: none !important;
    }
}

/* Desktop - Hide bottom nav */
@media (min-width: 768px) {
    .mobile-bottom-nav {
        display: none !important;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .mdb-navbar,
    .sidebar,
    .mobile-bottom-nav,
    .footer,
    .btn {
        display: none !important;
    }

    .main-content {
        margin-left: 0 !important;
        margin-top: 0 !important;
        width: 100% !important;
    }
}
