﻿.cal-container {
    border: 1px solid #dee2e6;
    border-radius: 4px;
    overflow-x: auto;
    overflow-y: hidden;
    background: white;
}

.cal-alert {
    background: #f8d7da;
    border: 1px solid #f5c2c7;
    color: #842029;
    padding: 0.75rem 1rem;
    border-radius: .25rem;
    margin-bottom: 1rem;
}

.cal-header {
    display: flex;
    border-bottom: 2px solid #dee2e6;
    background: #f8f9fa;
    position: sticky;
    top: 0;
    z-index: 10;
}

.cal-time-gutter {
    width: 60px;
    flex-shrink: 0;
    border-right: 1px solid #dee2e6;
}

.cal-col-header {
    flex: 1;
    min-width: 100px;
    padding: 8px 4px;
    text-align: center;
    font-weight: 600;
    font-size: 0.9rem;
    border-right: 1px solid #dee2e6;
}

    .cal-col-header:last-child {
        border-right: none;
    }

.cal-col-name {
    font-size: 0.95rem;
    font-weight: 700;
}

.cal-col-sub {
    font-size: 0.75rem;
    color: #6c757d;
    margin-top: 2px;
}

.cal-body {
    display: flex;
    position: relative;
}

.cal-time-column {
    width: 60px;
    flex-shrink: 0;
    border-right: 1px solid #dee2e6;
    position: relative;
    background: #fafafa;
}

.cal-time-marker {
    position: absolute;
    right: 4px;
    font-size: 0.7rem;
    color: #6c757d;
    transform: translateY(-50%);
    background: #fafafa;
    padding: 1px 2px;
}

.cal-cols {
    display: flex;
    flex: 1;
}

.cal-col {
    flex: 1;
    min-width: 100px;
    position: relative;
    border-right: 1px solid #e9ecef;
}

    .cal-col:last-child {
        border-right: none;
    }

.cal-hour-line {
    position: absolute;
    left: 0;
    right: 0;
    height: 1px;
    background: #e9ecef;
    z-index: 1;
}

.cal-block {
    position: absolute;
    /* Remove hardcoded background - set dynamically via inline style */
    border-left: 3px solid; /* Color set dynamically */
    border-radius: 3px;
    padding: 4px 6px;
    overflow: hidden;
    cursor: pointer;
    /* Only transition transform and box-shadow - NOT position/size */
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    z-index: 2;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-left: 2px;
    /* Force GPU acceleration for better performance */
    will-change: transform;
}

    .cal-block:hover {
        transform: scale(1.02);
        box-shadow: 0 3px 10px rgba(0,0,0,0.25);
        z-index: 3;
    }

    .cal-block.conflict {
        background: linear-gradient(135deg, #ffcccc 0%, #ffb3b3 100%) !important;
        border-left-color: #dc3545 !important;
        border: 2px solid #dc3545;
        z-index: 4;
    }

    .cal-block .course-title {
        font-weight: 700;
        font-size: 0.75rem;
        line-height: 1.2;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        margin-top: 0;
    }

    .cal-block .course-sub {
        font-size: 0.65rem;
        line-height: 1.2;
        margin-top: 1px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .cal-block .course-teacher {
        font-size: 0.65rem;
        line-height: 1.2;
        margin-top: 1px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        opacity: 0.9;
    }

    /* Also add course-name and course-path for other variants */
    .cal-block .course-name {
        font-weight: 700;
        font-size: 0.75rem;
        line-height: 1.2;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        margin-top: 0;
    }

    .cal-block .course-path {
        font-size: 0.65rem;
        font-weight: 600;
        line-height: 1.2;
        margin-top: 1px;
    }

    .cal-block .course-times {
        font-size: 0.65rem;
        line-height: 1.2;
        margin-top: 1px;
        opacity: 0.85;
    }

.cal-conflict-badge {
    font-size: 0.65rem;
    color: #dc3545;
    font-weight: 600;
    margin-top: 2px;
}

    .cal-conflict-badge i {
        font-size: 0.6rem;
    }
