﻿
.calendar-container {
    display: flex;
    flex-direction: column;
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
}

.calendar-header-row, .calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    width: 100%;
}

.calendar-header-cell {
    padding: 0.5rem;
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    border-right: 1px solid #dee2e6;
    text-align: center;
    font-weight: bold;
    color: #6c757d;
    font-size: 0.85rem;
}

    .calendar-header-cell:nth-child(7n) {
        border-right: none;
    }

.calendar-day {
    min-height: 180px; 
    display: flex;
    flex-direction: column;
    padding: 4px;
    border-right: 1px solid #eee;
    border-bottom: 1px solid #eee;
    background-color: #fff;
    transition: background-color 0.2s;
    cursor: pointer;
}

    .calendar-day:nth-child(7n) {
        border-right: none;
    }

    .calendar-day.disabled {
        background-color: #fdfdfd;
    }


.day-content-scrollable {
    flex-grow: 1;
    padding-right: 2px;

}


.calendar-day.drag-over {
    background-color: #e9ecef !important;
    border: 2px dashed #0d6efd;
}

.today-highlight {
    background-color: #fff8e1 !important;
}

.cursor-pointer {
    cursor: pointer;
}


.selected-route-mobile {
    background-color: #0d6efd !important;
    color: white !important;
    border-color: #0d6efd !important;
}

    .selected-route-mobile small {
        color: #e0e0e0 !important;
    }

    .selected-route-mobile i {
        color: white !important;
    }


.route-badge-compact {
    font-size: 0.75rem;
    padding: 0.25rem 0.4rem;
    margin-bottom: 3px;
}

.delete-icon:hover {
    color: #dc3545 !important;
    transform: scale(1.1);
}

.routes-list-container {
    max-height: 70vh;
    overflow-y: auto;
}


@media (max-width: 768px) {
    .calendar-day {
        min-height: 80px; 
    }

    .calendar-header-cell {
        font-size: 0.75rem;
        padding: 2px 0;
    }

    .day-number {
        font-size: 0.75rem;
    }

    .badge {
        font-size: 0.65rem;
        padding: 2px 3px;
        white-space: nowrap;
        /* NEW: Forces proper truncation on mobile */
        overflow: hidden;
        text-overflow: ellipsis;
        min-width: 0;
    }

    .delete-icon {
        font-size: 0.9rem;
        padding: 2px;
    }

    .routes-list-container {
        max-height: 150px;
        border: 1px solid #dee2e6;
        margin-bottom: 1rem;
    }
}

.calendar-container {
    display: flex;
    flex-direction: column;
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    /* NEW: Prevents the container from breaking page boundaries */
    width: 100%;
    overflow-x: hidden;
}

/* Update your existing cell classes by adding min-width: 0 */
.calendar-header-cell {
    padding: 0.5rem;
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    border-right: 1px solid #dee2e6;
    text-align: center;
    font-weight: bold;
    color: #6c757d;
    font-size: 0.85rem;
    /* NEW: Stops grid blowout */
    min-width: 0;
}

.calendar-day {
    min-height: 180px;
    display: flex;
    flex-direction: column;
    padding: 4px;
    border-right: 1px solid #eee;
    border-bottom: 1px solid #eee;
    background-color: #fff;
    transition: background-color 0.2s;
    cursor: pointer;
    /* NEW: Stops grid blowout */
    min-width: 0;
}

.day-content-scrollable {
    flex-grow: 1;
    padding-right: 2px;
    /* NEW: Stops long badges from spilling out of the days */
    overflow-x: hidden;
}