/* Global Styles */
body {
    background-color: #f4f6f8; /* Slightly cooler grey */
}

.no-transition {
    transition: none !important;
}

/* Navbar */
.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* Sidebar */
#sidebar-wrapper {
    width: 250px;
    height: 100vh;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: width 0.25s ease-out, margin 0.25s ease-out;
    box-shadow: 2px 0 5px rgba(0,0,0,0.05);
    background-color: #ffffff;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    #sidebar-wrapper {
        margin-left: -250px;
        position: fixed;
    }
    #sidebar-wrapper.toggled {
        margin-left: 0;
    }
}

.sidebar-heading {
    font-size: 1.2rem;
    letter-spacing: 0.5px;
}

.list-group-item {
    border: none;
    border-radius: 0.5rem !important;
    margin-bottom: 0.25rem;
    color: #555;
    transition: all 0.2s ease;
}

.list-group-item:hover {
    background-color: #f0f2f5;
    color: #2c3e50;
    transform: translateX(3px);
}

.list-group-item.active {
    background-color: var(--bs-primary);
    color: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Calendar Styles */
.calendar-header-row {
    background-color: #ffffff;
    border-bottom: 1px solid #e9ecef;
    font-weight: 600;
    color: #495057;
    padding: 10px 0;
    border-radius: 8px 8px 0 0;
}

.calendar-cell {
    width: 14.2857%; /* 100% / 7 */
    min-height: 160px;
    background-color: white;
    border-right: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
    padding: 8px;
    transition: background-color 0.2s;
}

.calendar-cell:hover {
    background-color: #fafbfc;
}

.calendar-cell.empty {
    background-color: #f8f9fa;
    background-image: radial-gradient(#e9ecef 1px, transparent 1px);
    background-size: 20px 20px;
}

/* Shift Cards */
.shift-card {
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    margin-bottom: 6px;
    font-size: 0.9rem;
}

.shift-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.12) !important;
}

.shift-card-day {
    background-color: #fffbf0; /* Very light amber */
    border-left: 4px solid #ffc107;
}

.shift-card-night {
    background-color: #f0f7ff; /* Very light blue */
    border-left: 4px solid #0d6efd;
}

.shift-card-other {
    background-color: #f8f0fc; /* Very light purple */
    border-left: 4px solid #9c27b0;
}

/* Card Styling */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
    transition: box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.card-header {
    background-color: white;
    border-bottom: 1px solid #f0f0f0;
    font-weight: 600;
    border-radius: 10px 10px 0 0 !important;
}

/* Buttons */
.btn {
    border-radius: 6px;
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: all 0.2s;
}

.btn-primary {
    box-shadow: 0 2px 4px rgba(var(--bs-primary-rgb), 0.3);
}

.btn-primary:hover {
    box-shadow: 0 4px 8px rgba(var(--bs-primary-rgb), 0.4);
    transform: translateY(-1px);
}

/* Modals */
.modal-content {
    border: none;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.modal-header {
    border-bottom: 1px solid #f0f0f0;
    background-color: #f8f9fa;
    border-radius: 12px 12px 0 0;
}

.modal-footer {
    border-top: 1px solid #f0f0f0;
    background-color: #f8f9fa;
    border-radius: 0 0 12px 12px;
}

.modal-body {
    max-height: 75vh;
    overflow-y: auto;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .calendar-cell {
        width: 100%;
        min-height: auto;
        border-right: none;
    }
    
    @media (min-width: 768px) {
        .calendar-cell {
            width: 14.2857%;
            min-height: 120px;
            border-right: 1px solid #f0f0f0;
        }
    }
}

/* Bulk Assign Mode */
body.bulk-mode-active .shift-card {
    cursor: pointer;
    transition: transform 0.2s;
}

body.bulk-mode-active .shift-card:hover {
    transform: scale(1.02);
    z-index: 5;
}

body.bulk-mode-active .shift-card:hover .selection-overlay {
    display: block !important;
}

/* Sidebar Collapsed State */
body.sidebar-collapsed #sidebar-wrapper {
    width: 80px !important;
}

/* Collapsed Sidebar Styles */
body.sidebar-collapsed #sidebar-wrapper {
    width: 80px;
}

body.sidebar-collapsed .sidebar-text {
    display: none !important;
}

body.sidebar-collapsed .sidebar-heading {
    justify-content: center !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

body.sidebar-collapsed .sidebar-heading .rounded-circle {
    margin-right: 0 !important;
}

body.sidebar-collapsed .list-group-item {
    justify-content: center !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    text-align: center;
}

body.sidebar-collapsed .list-group-item i {
    margin-right: 0 !important;
    font-size: 1.2rem;
}

body.sidebar-collapsed #sidebarFooter {
    justify-content: center !important;
}
