body {
    background: #f4f6f9;
    font-family: Arial, sans-serif;
}


/* ==========================================================
   TABLE
========================================================== */

table {
    background: #fff;
    font-size: 13px;
    border-collapse: collapse;
}

th,
td {
    text-align: center;
    vertical-align: middle;
    border: 1px solid #000 !important;
}


/* ==========================================================
   SPECIAL CELLS
========================================================== */

.day-cell,
.break-cell,
.lunch-cell,
.study-cell {
    background: rgba(102, 102, 102, .15) !important;
    font-weight: bold;
    text-align: center;
    vertical-align: middle;
    min-width: 45px;
    letter-spacing: 2px;
    font-size: 13px;
}

.class-cell {
    background: rgba(255, 255, 255, .25) !important;
    font-weight: bold;
    min-width: 90px;
}

.subject-cell {
    min-width: 100px;
    height: 70px;
}

.subject-name {
    font-weight: bold;
    color: #0d6efd;
}

.teacher-tag {
    color: #dc3545;
    font-size: 11px;
    font-weight: bold;
}


/* ==========================================================
   TIMETABLE GRID
========================================================== */

.grid-cell {
    min-width: 90px;
    height: 65px;

    cursor: grab;

    position: relative;

    transition:
        background-color .12s ease,
        outline .12s ease,
        transform .08s ease;

    user-select: none;
}


/*
----------------------------------------------------------
EMPTY CELL
----------------------------------------------------------
*/

.grid-cell:has(.empty-slot) {
    cursor: crosshair;
}


/*
----------------------------------------------------------
LESSON CELL
----------------------------------------------------------
*/

.grid-cell:has(.cell-data) {
    cursor: grab;
}


/*
----------------------------------------------------------
WHEN USER IS DRAGGING
----------------------------------------------------------
*/

.grid-cell.dragging {
    opacity: .45;
    transform: scale(.98);
}


/*
----------------------------------------------------------
DRAG TARGET
----------------------------------------------------------
*/

.grid-cell.over {
    outline: 3px dashed #0d6efd !important;
    outline-offset: -3px;

    background: rgba(13, 110, 253, .10) !important;
}


/*
----------------------------------------------------------
TARGET WITH EXISTING LESSON
----------------------------------------------------------
*/

.grid-cell.over:has(.cell-data) {
    background: rgba(255, 193, 7, .18) !important;
}


/* ==========================================================
   EMPTY SLOT
========================================================== */

.empty-slot {
    color: #999;
    font-size: 12px;
    pointer-events: none;
}


/* ==========================================================
   CELL CONTENT
========================================================== */

.cell-data {
    pointer-events: none;
    line-height: 1.25;
}

.cell-data strong {
    font-size: 13px;
}

/* ==========================================================
   SUBJECT PALETTE
========================================================== */

.subject-item {
    padding: 6px 10px;
    margin: 3px;

    background: #e9ecef;

    display: inline-block;

    cursor: grab;

    border-radius: 4px;

    font-size: 9px;

    user-select: none;

    transition:
        background-color .12s ease,
        transform .08s ease,
        box-shadow .12s ease;
}

.subject-item:hover {
    background: #dee2e6;
    box-shadow: 0 2px 5px rgba(0, 0, 0, .12);
}

.subject-item:active {
    cursor: grabbing;
    transform: scale(.97);
}


/* ==========================================================
   DRAGGING PALETTE SUBJECT
========================================================== */

.subject-item.dragging {
    opacity: .5;
}


/* ==========================================================
   TIME
========================================================== */

.time-text {
    font-size: 11px;
    color: #666;
}


/* ==========================================================
   STATUS
========================================================== */

#status {
    font-size: 12px;
    min-height: 18px;

    transition:
        opacity .15s ease;
}


/* ==========================================================
   TABLE HOVER
========================================================== */

tr:hover td {
    background: rgba(0, 0, 0, .04) !important;
}


/*
----------------------------------------------------------
Don't let row hover destroy drag target highlighting
----------------------------------------------------------
*/

tr:hover td.grid-cell.over {
    background: rgba(13, 110, 253, .10) !important;
}


/* ==========================================================
   RESPONSIVE
========================================================== */

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.grid-cell {
    white-space: nowrap;
}


/* ==========================================================
   PRINT
========================================================== */

@media print {

    body {
        background: #fff;
        margin: 0;
        padding: 0;
    }

    body * {
        visibility: hidden;
    }

    #printArea,
    #printArea * {
        visibility: visible;
    }

    #printArea {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        display: block;
    }

    .teacher-timetable {
        width: 100%;
        font-size: 10px;
        border-collapse: collapse;
    }

    .teacher-timetable th,
    .teacher-timetable td {
        padding: 2px;
    }

    @page {
        size: A3 landscape;
        margin: 7mm;
    }

}