/* ============================================================
   ICA Schedule – Frontend Styles
   ============================================================ */

.ica-schedule-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    font-family: inherit;
    margin: 0 0 20px;
}

.ica-schedule-title {
    font-size: 13px;
    color: #6baed6;
    font-style: italic;
    margin-bottom: 8px;
    line-height: 1.5;
}

.ica-schedule-table {
    border-collapse: collapse;
    width: 100%;
    min-width: 400px;
    font-size: 13px;
    background: #fff;
}

/* Header row */
.ica-schedule-table thead th {
    background: #d4a017;
    color: #fff;
    font-weight: 700;
    text-align: center;
    padding: 8px 10px;
    border: 1px solid #bbb;
    letter-spacing: 0.3px;
    white-space: nowrap;
    vertical-align: middle;
}

/* Cột KHUNG GIỜ (group label) */
.ica-sch-group-cell {
    text-align: center;
    font-weight: 700;
    font-size: 13px;
    color: #fff;
    vertical-align: middle;
    border: 1px solid #bbb;
    padding: 8px 12px;
    white-space: nowrap;
}

/* Cột NHÂN SỰ */
.ica-sch-name-cell {
    text-align: center;
    font-weight: 700;
    font-size: 12px;
    color: #333;
    background: #f5f5dc;
    border: 1px solid #bbb;
    padding: 8px 10px;
    white-space: nowrap;
    vertical-align: middle;
}

/* Ô ca làm việc */
.ica-sch-shift-cell {
    text-align: center;
    vertical-align: middle;
    border: 1px solid #bbb;
    padding: 6px 8px;
    line-height: 1.35;
    background: #fff;
}

/* Block ca (SÁNG hoặc TỐI – có thể có 2 block trong 1 ô) */
.ica-sch-shift-block {
    display: block;
    line-height: 1.35;
}

.ica-sch-shift-block + .ica-sch-shift-block {
    border-top: 1px dashed #ccc;
    margin-top: 4px;
    padding-top: 4px;
}

.ica-sch-shift-type {
    font-weight: 700;
    font-size: 11px;
    color: #555;
    letter-spacing: 0.4px;
    display: block;
}

.ica-sch-shift-time {
    font-size: 12px;
    color: #333;
    display: block;
}

/* Chỉ tô đỏ text khi giờ lệch chuẩn */
.ica-sch-shift-block.is-different .ica-sch-shift-type,
.ica-sch-shift-block.is-different .ica-sch-shift-time {
    color: #c62828;
    font-weight: 700;
}

/* Ô OFF */
.ica-sch-shift-cell.is-off {
    background: #ffe000;
}

.ica-sch-shift-cell.is-off .ica-sch-shift-type {
    font-size: 14px;
    color: #333;
    letter-spacing: 0.8px;
}

/* Ô trống */
.ica-sch-shift-cell.is-empty {
    background: #fafafa;
}

/* Zebra nhẹ để dễ nhìn */
.ica-schedule-table tbody tr:nth-child(even) .ica-sch-shift-cell:not(.is-off) {
    background: #fcfcfc;
}

/* Responsive */
@media (max-width: 768px) {
    .ica-schedule-table {
        font-size: 12px;
        min-width: 620px;
    }

    .ica-schedule-table thead th,
    .ica-sch-group-cell,
    .ica-sch-name-cell,
    .ica-sch-shift-cell {
        padding: 7px 8px;
    }

    .ica-sch-shift-type {
        font-size: 10px;
    }

    .ica-sch-shift-time {
        font-size: 11px;
    }
}