/* =========================================================
   ICCSC 2026 - SIMPLE FILTERABLE SCHEDULE
   ========================================================= */

.schedule-page {
    background: #f5f7fb;
    padding: 35px 0 60px;
    min-height: 500px;
}

.schedule-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
    margin-bottom: 20px;
}

.schedule-kicker {
    display: inline-block;
    color: #0b3d91;
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .12em;
    margin-bottom: 5px;
}

.schedule-heading h2 {
    margin: 0 0 6px;
    color: #17283f;
    font-size: 1.65rem;
    font-weight: 800;
}

.schedule-heading p {
    margin: 0;
    color: #66758a;
    font-size: .9rem;
}

.schedule-summary {
    min-width: 125px;
    padding: 12px 18px;
    text-align: center;
    background: #fff;
    border: 1px solid #dce5ef;
    border-radius: 12px;
    box-shadow: 0 5px 16px rgba(20,45,80,.06);
}

.schedule-summary strong,
.schedule-summary span { display: block; }

.schedule-summary strong {
    color: #0b3d91;
    font-size: 1.45rem;
    line-height: 1;
}

.schedule-summary span {
    margin-top: 5px;
    color: #68778b;
    font-size: .7rem;
    font-weight: 700;
}

.filter-card {
    margin-bottom: 16px;
    padding: 17px;
    background: #fff;
    border: 1px solid #dce5ef;
    border-radius: 13px;
    box-shadow: 0 5px 18px rgba(20,45,80,.05);
}

.filter-grid {
    display: grid;
    grid-template-columns: 1fr 1.35fr 2fr 125px;
    gap: 12px;
    align-items: end;
}

.filter-item label {
    display: block;
    margin-bottom: 6px;
    color: #526277;
    font-size: .72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.filter-item .form-select,
.search-box .form-control {
    min-height: 42px;
    border-color: #d5deea;
    font-size: .85rem;
}

.search-box { position: relative; }

.search-box i {
    position: absolute;
    z-index: 2;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    color: #738198;
}

.search-box .form-control { padding-left: 38px; }

.current-filter {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin: 14px 0 10px;
    color: #536277;
    font-size: .78rem;
}

.page-size-wrap {
    display: flex;
    align-items: center;
    gap: 7px;
}

.page-size-wrap label { font-weight: 700; }

.page-size-wrap select {
    padding: 4px 7px;
    border: 1px solid #d2dce8;
    border-radius: 6px;
    background: #fff;
}

.table-card {
    overflow: hidden;
    background: #fff;
    border: 1px solid #dce5ef;
    border-radius: 13px;
    box-shadow: 0 6px 22px rgba(20,45,80,.06);
}

.schedule-table {
    width: 100%;
    min-width: 1050px;
    margin: 0;
    border-collapse: collapse;
    table-layout: fixed;
}

.schedule-table th {
    padding: 11px 9px;
    background: #0b3d91;
    color: #fff;
    border: 1px solid #0b3d91;
    font-size: .74rem;
    font-weight: 800;
    text-align: center;
    white-space: nowrap;
}

.schedule-table td {
    padding: 10px 9px;
    border: 1px solid #e1e6ed;
    color: #28384d;
    font-size: .79rem;
    line-height: 1.45;
    vertical-align: middle;
    overflow-wrap: anywhere;
}

.schedule-table tbody tr:nth-child(even) { background: #fbfcfe; }
.schedule-table tbody tr:hover { background: #f1f6fc; }

/* =========================================================
   DESKTOP COLUMN CONTROL
   Use explicit widths because the table uses table-layout: fixed.
   This gives the Time column a visibly larger area.
   ========================================================= */

.schedule-table th:nth-child(1),
.schedule-table td:nth-child(1) {
    width: 55px;
}

.schedule-table th:nth-child(2),
.schedule-table td:nth-child(2) {
    width: 85px;
}

.schedule-table th:nth-child(3),
.schedule-table td:nth-child(3) {
    width: 125px;
}

.schedule-table th:nth-child(4),
.schedule-table td:nth-child(4) {
    width: 180px;
}

.schedule-table th:nth-child(5),
.schedule-table td:nth-child(5) {
    width: 65px;
}

.schedule-table th:nth-child(6),
.schedule-table td:nth-child(6) {
    width: 75px;
}

/* Remaining table width automatically goes to Paper / Programme. */
.schedule-table th:nth-child(7),
.schedule-table td:nth-child(7) {
    width: auto;
}

.time-cell {
    white-space: nowrap;
    text-align: center;
    font-weight: 700;
}

.sl-cell,
.day-cell,
.time-cell,
.room-cell,
.id-cell {
    text-align: center;
    font-weight: 700;
}

.venue-cell { font-weight: 600; }
.paper-cell { text-align: left; font-weight: 500; }

.schedule-table tr.special-row { background: #f0f4f8 !important; }
.schedule-table tr.special-row td { font-weight: 700; }

.schedule-table tr.special-row.keynote td:last-child,
.schedule-table tr.special-row.inauguration td:last-child {
    color: #0b3d91;
}

.schedule-table tr.special-row.break td:last-child { color: #9a5b00; }
.schedule-table tr.special-row.lunch td:last-child { color: #177245; }

.no-results {
    padding: 55px 20px;
    text-align: center;
    color: #6c7b90;
}

.no-results i {
    display: block;
    margin-bottom: 10px;
    font-size: 2rem;
}

.no-results h4 {
    margin: 0 0 5px;
    color: #29394e;
}

.pagination-area {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 14px 16px;
    border-top: 1px solid #e1e6ed;
}

.pagination-info {
    color: #66758a;
    font-size: .76rem;
    font-weight: 600;
}

.pagination .page-link {
    min-width: 34px;
    text-align: center;
    color: #0b3d91;
    border-color: #d8e1eb;
    font-size: .78rem;
}

.pagination .page-item.active .page-link {
    background: #0b3d91;
    border-color: #0b3d91;
    color: #fff;
}

@media (max-width: 991.98px) {
    .filter-grid {
        grid-template-columns: 1fr 1fr;
    }

    .search-item,
    .reset-item { grid-column: 1 / -1; }

    .schedule-table {
        min-width: 1050px;
    }

    .schedule-table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

@media (max-width: 767.98px) {
    .schedule-page { padding: 20px 0 35px; }

    .schedule-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
        margin-bottom: 15px;
    }

    .schedule-heading h2 { font-size: 1.3rem; }
    .schedule-heading p { font-size: .82rem; line-height: 1.5; }

    .schedule-summary {
        width: 100%;
        padding: 10px 15px;
    }

    .schedule-summary strong { font-size: 1.35rem; }

    .filter-card {
        margin-bottom: 12px;
        padding: 12px;
        border-radius: 10px;
    }

    .filter-grid { grid-template-columns: 1fr; gap: 10px; }
    .search-item,
    .reset-item { grid-column: auto; }

    .filter-item label {
        margin-bottom: 4px;
        font-size: .68rem;
    }

    .filter-item .form-select,
    .search-box .form-control {
        min-height: 40px;
        font-size: .82rem;
    }

    .current-filter {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
        margin: 12px 0 9px;
        font-size: .75rem;
    }

    .page-size-wrap {
        width: 100%;
        justify-content: space-between;
    }

    .page-size-wrap select {
        min-width: 72px;
        padding: 4px 6px;
    }

    /* =====================================================
       MOBILE SCHEDULE CARDS
       The desktop table becomes easy-to-read cards.
       No horizontal scrolling is required on phones.
       ===================================================== */

    .table-card {
        overflow: visible;
        border: 0;
        background: transparent;
        box-shadow: none;
    }

    .schedule-table-wrap {
        overflow: visible !important;
    }

    .schedule-table,
    .schedule-table thead,
    .schedule-table tbody,
    .schedule-table tr,
    .schedule-table td {
        display: block;
        width: 100%;
    }

    .schedule-table {
        min-width: 0 !important;
        border-collapse: separate;
        border-spacing: 0;
    }

    .schedule-table thead {
        display: none;
    }

    .schedule-table tbody {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .schedule-table tbody tr {
        position: relative;
        margin: 0;
        padding: 12px;
        background: #fff !important;
        border: 1px solid #dce5ef;
        border-radius: 11px;
        box-shadow: 0 3px 12px rgba(20,45,80,.055);
    }

    .schedule-table tbody tr:hover {
        background: #fff !important;
    }

    .schedule-table td {
        display: grid;
        grid-template-columns: 92px minmax(0, 1fr);
        gap: 8px;
        width: 100%;
        min-height: 30px;
        padding: 6px 0;
        border: 0;
        border-bottom: 1px solid #edf0f4;
        text-align: left;
        font-size: .78rem;
        line-height: 1.4;
        overflow-wrap: anywhere;
    }

    .schedule-table td:last-child {
        border-bottom: 0;
        padding-bottom: 2px;
    }

    .schedule-table td::before {
        content: attr(data-label);
        color: #68778b;
        font-size: .67rem;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: .035em;
    }

    .schedule-table .sl-cell,
    .schedule-table .day-cell,
    .schedule-table .room-cell,
    .schedule-table .id-cell {
        text-align: left;
        font-weight: 700;
    }
    
    .schedule-table .time-cell{
        text-align: center;
        font-weight: 700;
        white-space: nowrap;
    }

    .schedule-table .sl-cell {
        color: #0b3d91;
    }

    .schedule-table .paper-cell {
        display: block;
        padding-top: 9px;
        border-top: 2px solid #eef2f7;
        font-size: .82rem;
        font-weight: 600;
    }

    .schedule-table .paper-cell::before {
        display: block;
        margin-bottom: 4px;
    }

    .schedule-table .venue-cell {
        font-weight: 600;
    }

    /* Special programme rows remain clearly identifiable. */
    .schedule-table tr.special-row {
        padding: 11px 12px;
        border-left: 4px solid #0b3d91;
    }

    .schedule-table tr.special-row .paper-cell {
        color: #0b3d91;
        font-weight: 800;
    }

    .schedule-table tr.special-row .sl-cell,
    .schedule-table tr.special-row .day-cell,
    .schedule-table tr.special-row .time-cell,
    .schedule-table tr.special-row .venue-cell,
    .schedule-table tr.special-row .room-cell,
    .schedule-table tr.special-row .id-cell {
        display: none;
    }

    .schedule-table tr.special-row .paper-cell {
        display: block;
        padding: 3px 0;
        border-top: 0;
    }

    .schedule-table tr.special-row .paper-cell::before {
        display: none;
    }

    .no-results {
        padding: 45px 15px;
        background: #fff;
        border: 1px solid #dce5ef;
        border-radius: 11px;
    }

    .pagination-area {
        align-items: center;
        flex-direction: column;
        padding: 13px 5px 0;
        border-top: 0;
        gap: 9px;
    }

    .pagination-info {
        text-align: center;
        font-size: .72rem;
    }

    .pagination {
        flex-wrap: wrap;
        justify-content: center;
    }

    .pagination .page-link {
        min-width: 32px;
        padding: 5px 7px;
        font-size: .75rem;
    }
}

@media (max-width: 420px) {
    .schedule-page .container {
        padding-left: 10px;
        padding-right: 10px;
    }

    .filter-card { padding: 12px; }

    .pagination .page-link {
        min-width: 30px;
        padding: 5px 7px;
    }
}

/* =========================================================
   MOBILE OVERLAP FIX - FINAL OVERRIDES
   ========================================================= */
@media (max-width: 767.98px) {
    .schedule-table,
    .schedule-table tbody,
    .schedule-table tr,
    .schedule-table td {
        box-sizing: border-box !important;
    }

    .schedule-table {
        table-layout: auto !important;
        border-collapse: separate !important;
        border-spacing: 0 !important;
    }

    .schedule-table tbody tr {
        display: block !important;
        width: 100% !important;
        height: auto !important;
        min-height: 0 !important;
        overflow: visible !important;
    }

    .schedule-table tbody td {
        position: static !important;
        float: none !important;
        clear: both !important;
        box-sizing: border-box !important;
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        min-height: 0 !important;
        margin: 0 !important;
        white-space: normal !important;
        word-break: normal !important;
        overflow-wrap: anywhere !important;
        word-wrap: break-word !important;
        vertical-align: top !important;
    }

    .schedule-table tbody td:not(.paper-cell) {
        display: grid !important;
        grid-template-columns: 82px minmax(0, 1fr) !important;
        align-items: start !important;
        column-gap: 9px !important;
    }

    .schedule-table tbody td::before {
        position: static !important;
        display: block !important;
        width: auto !important;
        min-width: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        white-space: normal !important;
        word-break: normal !important;
        overflow-wrap: normal !important;
        line-height: 1.35 !important;
    }

    .schedule-table tbody .paper-cell {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        white-space: normal !important;
        overflow-wrap: anywhere !important;
        word-break: normal !important;
        line-height: 1.5 !important;
    }

    .schedule-table tbody .paper-cell::before {
        display: block !important;
        width: 100% !important;
        margin: 0 0 5px !important;
        padding: 0 !important;
        line-height: 1.25 !important;
    }

    .schedule-table tbody .venue-cell,
    .schedule-table tbody .paper-cell {
        hyphens: auto;
    }

    /* Keep special programme rows compact and completely separate. */
    .schedule-table tbody tr.special-row {
        display: block !important;
        width: 100% !important;
        overflow: visible !important;
    }

    .schedule-table tbody tr.special-row td:not(.paper-cell) {
        display: none !important;
    }

    .schedule-table tbody tr.special-row .paper-cell {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        border: 0 !important;
        padding: 2px 0 !important;
    }
}

@media (max-width: 360px) {
    .schedule-table tbody td:not(.paper-cell) {
        grid-template-columns: 70px minmax(0, 1fr) !important;
        column-gap: 7px !important;
        font-size: .75rem !important;
    }

    .schedule-table tbody td::before {
        font-size: .62rem !important;
    }

    .schedule-table tbody .paper-cell {
        font-size: .78rem !important;
    }
}