/* CasettaFit Custom Styles */

/* Mobile header with logo */
.mobile-header {
    background: #292D3A;
    padding: 1rem;
    position: sticky;
    top: 0;
    z-index: 1040;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.mobile-header-content {
    display: flex;
    justify-content: center;
    align-items: center;
}

.mobile-logo {
    height: 32px;
    width: auto;
}

/* Add top spacing for page titles on mobile */
@media (max-width: 767px) {
    .body.flex-grow-1 .container-lg {
        padding-top: 1rem;
    }
    
    .body.flex-grow-1 h2:first-of-type,
    .body.flex-grow-1 h1:first-of-type {
        margin-top: 0.5rem;
    }
    
    /* Calendar page ONLY - remove horizontal padding for full width */
    .body.flex-grow-1:has(.calendar-page-container) .container-lg {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    .calendar-page-container {
        padding-left: 0 !important;
        padding-right: 0 !important;
        max-width: 100% !important;
    }
    .calendar-page-container .row {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    .calendar-page-container .col-12 {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    /* Add padding back to calendar header section only */
    .calendar-page-container > .row:first-child {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
        margin-bottom: 1rem !important;
    }
    .calendar-page-container > .row:first-child .col-12 {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
}

/* Mobile-first responsive design */
body {
    padding-bottom: 70px !important; /* Space for bottom nav on mobile */
}

@media (min-width: 768px) {
    body {
        padding-bottom: 0 !important;
    }
}

/* Prevent content from covering bottom nav */
.body.flex-grow-1 {
    padding-bottom: 80px !important;
}

@media (min-width: 768px) {
    .body.flex-grow-1 {
        padding-bottom: 0 !important;
    }
}

/* Bottom navigation for mobile */
.bottom-nav {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    background: #fff;
    border-top: 1px solid #d8dbe0;
    display: flex;
    justify-content: space-around;
    padding: 0.5rem 0;
    z-index: 10050 !important;
    pointer-events: auto !important;
    height: 70px;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}

.bottom-nav-item {
    flex: 1;
    text-align: center;
    padding: 0.5rem;
    color: #768192;
    text-decoration: none;
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    position: relative !important;
    z-index: 9999 !important;
    cursor: pointer !important;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
    touch-action: manipulation !important;
    pointer-events: auto !important;
    min-height: 60px;
}

.bottom-nav-item i {
    pointer-events: none;
}

.bottom-nav-item span {
    pointer-events: none;
}

.bottom-nav-item.active {
    color: #321fdb;
}

.bottom-nav-item i {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

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

/* Mobile menu overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Mobile slide-up menu */
.mobile-menu {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 1rem 1rem 0 0;
    z-index: 10001;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    max-height: 60vh;
    display: flex;
    flex-direction: column;
}

.mobile-menu.active {
    transform: translateY(0);
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #d8dbe0;
}

.mobile-menu-header h5 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.mobile-menu-content {
    overflow-y: auto;
    padding: 0.5rem 0;
}

.mobile-menu-item {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    color: #333;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.mobile-menu-item:hover,
.mobile-menu-item:active {
    background-color: #f8f9fa;
    color: #321fdb;
}

.mobile-menu-item i {
    font-size: 1.5rem;
    margin-right: 1rem;
    width: 24px;
    text-align: center;
}

.mobile-menu-item span {
    font-size: 1rem;
}

.mobile-menu-divider {
    height: 1px;
    background: #d8dbe0;
    margin: 0.5rem 1.5rem;
}

@media (min-width: 768px) {
    .mobile-menu,
    .mobile-menu-overlay {
        display: none;
    }
}

/* Hide sidebar on mobile */
@media (max-width: 767px) {
    .sidebar {
        display: none;
    }
}
