/* =========================================================
   WCSS CAMPUS SCHEDULE PUBLIC CSS
   Version: Production Scoped CSS
   Purpose: TV schedule display, export page, and WCSS UI only.
   Safety: No global html/body CSS except body.wcss-tv-body.
   ========================================================= */


/* =========================================================
   SECTION 1 — STANDALONE TV BODY ONLY
   ========================================================= */

body.wcss-tv-body {
    margin: 0 !important;
    padding: 0 !important;
    background: #057fb0;
    overflow: hidden;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

body.wcss-tv-body #wpadminbar {
    display: none !important;
    height: 0 !important;
}


/* =========================================================
   SECTION 2 — TV SCHEDULE MAIN WRAPPER
   ========================================================= */

.wcss-tv-schedule-wrap {
    width: 100%;
    min-height: 100vh;
    background: #057fb0;
    font-family: Arial, Helvetica, sans-serif;
    color: #ffffff;
    position: relative;
    overflow: hidden;
    padding: 0 32px 8px 32px;
    box-sizing: border-box;
}

.wcss-tv-title {
    margin: 14px 0 14px;
    padding: 0;
    text-align: center;
    color: #ffffff;
    font-size: 44px;
    line-height: 1.08;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    position: relative;
    z-index: 2;
}

body.wcss-tv-body .wcss-tv-meta {
    display: none !important;
}

.wcss-tv-meta {
    text-align: center;
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 8px;
    position: relative;
    z-index: 2;
    opacity: 0.95;
}

.wcss-tv-meta span {
    padding: 0 10px;
    color: #ffdf25;
}


/* =========================================================
   SECTION 3 — TV TABLE BASE DESIGN
   ========================================================= */

.wcss-tv-table-scroll {
    width: 100%;
    overflow: visible;
}

.wcss-tv-table {
    width: 92%;
    margin: 0 auto;
    border-collapse: collapse;
    table-layout: fixed;
    position: relative;
    z-index: 2;
}

.wcss-tv-table th {
    background: #002f63;
    color: #ffdf25;
    font-size: 21px;
    font-weight: 800;
    text-align: left;
    padding: 8px 8px;
    line-height: 1.15;
    vertical-align: middle;
}

.wcss-tv-table td {
    font-size: 19px;
    font-weight: 700;
    padding: 8px 8px;
    line-height: 1.25;
    color: #002b5c;
    vertical-align: middle;
}

.wcss-tv-table tbody tr:nth-child(odd) {
    background: #fffdf1;
}

.wcss-tv-table tbody tr:nth-child(even) {
    background: #057fb0;
}

.wcss-tv-table tbody tr:nth-child(even) td {
    color: #ffffff;
}


/* =========================================================
   SECTION 4 — TV TABLE COLUMN WIDTHS
   ========================================================= */

.wcss-tv-table th:nth-child(1),
.wcss-tv-table td:nth-child(1) {
    width: 18%;
}

.wcss-tv-table th:nth-child(2),
.wcss-tv-table td:nth-child(2) {
    width: 18%;
}

.wcss-tv-table th:nth-child(3),
.wcss-tv-table td:nth-child(3) {
    width: 35%;
}

.wcss-tv-table th:nth-child(4),
.wcss-tv-table td:nth-child(4) {
    width: 17%;
    text-align: center;
}

.wcss-tv-table th:nth-child(5),
.wcss-tv-table td:nth-child(5) {
    width: 12%;
    text-align: center;
}

.wcss-tv-table td:nth-child(3) {
    line-height: 1.18;
}


/* =========================================================
   SECTION 5 — EMPTY AND ERROR STATES
   ========================================================= */

.wcss-tv-empty {
    margin: 60px auto 0 auto;
    width: 80%;
    background: #fffdf1;
    color: #002b5c;
    padding: 40px;
    text-align: center;
    font-size: 34px;
    font-weight: 800;
    border-radius: 4px;
    position: relative;
    z-index: 2;
}

.wcss-public-error {
    background: #ffffff;
    border-left: 5px solid #c5221f;
    color: #002b5c;
    padding: 20px;
    max-width: 900px;
    margin: 30px auto;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}


/* =========================================================
   SECTION 6 — TOP DECORATION CURVES
   ========================================================= */

.wcss-tv-top-decoration {
    position: absolute;
    top: -70px;
    left: 0;
    width: 100%;
    height: 150px;
    z-index: 1;
    pointer-events: none;
}

.wcss-curve-left {
    position: absolute;
    top: 0;
    left: -30px;
    width: 420px;
    height: 120px;
    border-bottom: 8px solid #f2b705;
    border-radius: 0 0 70% 70%;
    background: #005987;
    transform: rotate(-8deg);
}

.wcss-curve-right {
    position: absolute;
    top: 0;
    right: -40px;
    width: 420px;
    height: 120px;
    border-bottom: 8px solid #f2b705;
    border-radius: 0 0 70% 70%;
    background: #005987;
    transform: rotate(8deg);
}


/* =========================================================
   SECTION 7 — TV NAVIGATION ARROWS
   ========================================================= */

.wcss-tv-arrow {
    position: fixed;
    top: 50%;
    width: 64px;
    height: 110px;
    margin-top: -55px;
    background: rgba(255,255,255,0.14);
    color: #ffffff;
    font-size: 82px;
    line-height: 100px;
    text-align: center;
    text-decoration: none;
    z-index: 20;
    border: 1px solid rgba(255,255,255,0.28);
    box-shadow: 0 8px 24px rgba(0,0,0,0.18);
    backdrop-filter: blur(8px);
    opacity: 0.25;
    transition: opacity 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.wcss-tv-arrow:hover,
.wcss-tv-arrow:focus {
    opacity: 1;
    background: rgba(255,255,255,0.25);
    color: #ffdf25;
    outline: none;
}

.wcss-tv-arrow-left {
    left: 0;
    border-radius: 0 18px 18px 0;
}

.wcss-tv-arrow-right {
    right: 0;
    border-radius: 18px 0 0 18px;
}

.wcss-tv-arrow-left:hover {
    transform: translateX(4px);
}

.wcss-tv-arrow-right:hover {
    transform: translateX(-4px);
}


/* =========================================================
   SECTION 8 — ANNOUNCEMENT BAR
   ========================================================= */

.wcss-tv-announcement {
    position: relative;
    z-index: 2;
    background: #ffdf25;
    color: #002b5c;
    text-align: center;
    font-size: 24px;
    font-weight: 800;
    padding: 8px 16px;
    margin: 0 0 8px 0;
    border-radius: 2px;
}


/* =========================================================
   SECTION 9 — HOLIDAY / OVERRIDE SCREEN
   ========================================================= */

.wcss-tv-override {
    position: relative;
    z-index: 2;
    width: 88%;
    min-height: 460px;
    margin: 48px auto 0 auto;
    background: #fffdf1;
    color: #002b5c;
    padding: 34px 46px;
    border-radius: 12px;
    box-shadow: 0 16px 42px rgba(0,0,0,0.24);
    border-top: 10px solid #ffdf25;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 42px;
    box-sizing: border-box;
}

.wcss-tv-override-image {
    width: 38%;
    text-align: center;
    margin: 0;
}

.wcss-tv-override-image img {
    max-width: 100%;
    max-height: 360px;
    width: auto;
    height: auto;
    display: inline-block;
    border-radius: 10px;
    box-shadow: 0 10px 26px rgba(0,0,0,0.28);
    background: #ffffff;
}

.wcss-tv-override-content {
    width: 56%;
    text-align: left;
}

.wcss-tv-override-label {
    display: inline-block;
    background: #002f63;
    color: #ffdf25;
    padding: 9px 22px;
    font-size: 22px;
    font-weight: 900;
    letter-spacing: 2px;
    margin-bottom: 20px;
}

.wcss-tv-override h2 {
    margin: 0 0 18px 0;
    font-size: 54px;
    line-height: 1.1;
    font-weight: 900;
    color: #002b5c;
}

.wcss-tv-override p {
    margin: 0;
    font-size: 32px;
    line-height: 1.35;
    font-weight: 800;
    color: #555555;
}

.wcss-tv-override-emergency {
    border-top-color: #c5221f;
}

.wcss-tv-override-emergency .wcss-tv-override-label {
    background: #c5221f;
    color: #ffffff;
}


/* =========================================================
   SECTION 10 — ROW STATUS COLORS
   ========================================================= */

.wcss-tv-table tbody tr.wcss-row-status-cancelled td {
    background: #c5221f !important;
    color: #ffffff !important;
}

.wcss-tv-table tbody tr.wcss-row-status-moved_online td {
    background: #ffdf25 !important;
    color: #002b5c !important;
}

.wcss-tv-table tbody tr.wcss-row-status-room_changed td {
    background: #fff3cd !important;
    color: #002b5c !important;
}

.wcss-tv-table tbody tr.wcss-row-status-delayed td {
    background: #f59e0b !important;
    color: #ffffff !important;
}

.wcss-tv-row-note {
    font-size: 15px;
    font-weight: 700;
    margin-top: 4px;
    opacity: 0.9;
}


/* =========================================================
   SECTION 11 — FIT MODES / RESPONSIVE ROW DENSITY
   JS-friendly version.
   CSS controls design only.
   JS controls exact row height for screen fit.
   ========================================================= */

/* Title stays consistent */
.wcss-fit-normal .wcss-tv-title,
.wcss-fit-medium .wcss-tv-title,
.wcss-fit-large .wcss-tv-title,
.wcss-fit-ultra .wcss-tv-title {
    font-size: 42px;
    margin: 14px 0 14px;
    line-height: 1.08;
}

/* Header stays consistent */
.wcss-fit-normal .wcss-tv-table th,
.wcss-fit-medium .wcss-tv-table th,
.wcss-fit-large .wcss-tv-table th,
.wcss-fit-ultra .wcss-tv-table th {
    font-size: 20px;
    padding: 7px 8px;
    line-height: 1.1;
}

/* Table width consistent */
.wcss-fit-normal .wcss-tv-table,
.wcss-fit-medium .wcss-tv-table,
.wcss-fit-large .wcss-tv-table,
.wcss-fit-ultra .wcss-tv-table {
    width: 92%;
}

/* Body cells: default style only, no fixed height */
.wcss-fit-normal .wcss-tv-table td,
.wcss-fit-medium .wcss-tv-table td,
.wcss-fit-large .wcss-tv-table td,
.wcss-fit-ultra .wcss-tv-table td {
    font-size: 18px;
    padding: 4px 7px;
    line-height: 1.08;
    height: auto;
    box-sizing: border-box;
}

/* Prevent time wrapping */
.wcss-tv-table th:nth-child(4),
.wcss-tv-table td:nth-child(4) {
    width: 19%;
    white-space: nowrap;
    text-align: center;
}

/* Classroom enough space */
.wcss-tv-table th:nth-child(5),
.wcss-tv-table td:nth-child(5) {
    width: 14%;
    text-align: center;
}

/* Course column balance */
.wcss-tv-table th:nth-child(3),
.wcss-tv-table td:nth-child(3) {
    width: 31%;
}

/* Keep classroom messages readable */
.wcss-tv-table td:nth-child(5) {
    line-height: 1.05;
}


/* =========================================================
   SECTION 12 — API / SETTINGS UI BOXES
   ========================================================= */

.wcss-api-campus-box {
    margin: 14px 0;
    border: 1px solid #d9dce3;
    border-radius: 10px;
    background: #ffffff;
    overflow: hidden;
}

.wcss-api-campus-box summary {
    cursor: pointer;
    padding: 15px 18px;
    background: #f8fafc;
    font-size: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wcss-api-campus-box summary strong {
    color: #002b5c;
    font-size: 16px;
}

.wcss-api-campus-box summary span {
    color: #64748b;
    font-size: 13px;
}

.wcss-api-campus-content {
    padding: 18px;
}

.wcss-api-campus-content h3 {
    margin-top: 20px;
    margin-bottom: 8px;
    color: #002b5c;
}

.wcss-api-campus-content textarea {
    font-family: Consolas, Monaco, monospace;
    font-size: 12px;
    background: #f8fafc;
}


/* =========================================================
   SECTION 13 — EXPORT PAGE
   ========================================================= */

.wcss-export-page {
    margin: 0;
    min-height: 100vh;
    font-family: Arial, sans-serif;
    background: #073b73;
    color: #111827;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    box-sizing: border-box;
}

.wcss-export-box {
    width: 620px;
    max-width: calc(100% - 40px);
    background: #ffffff;
    padding: 42px;
    border-radius: 22px;
    box-shadow: 0 25px 70px rgba(0,0,0,0.28);
    border-top: 10px solid #d4af37;
    text-align: center;
    box-sizing: border-box;
}

.wcss-export-box h1 {
    margin: 0 0 14px;
    color: #073b73;
    font-size: 42px;
    line-height: 1.08;
    font-weight: 800;
}

.wcss-export-box p {
    color: #475569;
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 24px;
}

.wcss-export-button {
    background: #073b73;
    color: #ffffff;
    border: 0;
    padding: 14px 28px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 800;
}

.wcss-export-button:hover {
    background: #052b54;
}

.wcss-export-status {
    margin-top: 24px;
    padding: 16px;
    background: #f8fafc;
    border-left: 5px solid #d4af37;
    border-radius: 10px;
    font-weight: 700;
    line-height: 1.6;
    text-align: left;
}


/* =========================================================
   SECTION 14 — SMALL SCREEN RESPONSIVE SUPPORT
   ========================================================= */

@media (max-width: 900px) {
    .wcss-tv-schedule-wrap {
        padding: 0 12px 30px 12px;
    }

    .wcss-tv-title {
        font-size: 30px !important;
    }

    .wcss-tv-meta {
        font-size: 13px;
    }

    .wcss-tv-table-scroll {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .wcss-tv-table {
        width: 100%;
        min-width: 900px;
    }

    .wcss-tv-table th {
        font-size: 16px;
    }

    .wcss-tv-table td {
        font-size: 15px;
        height: auto !important;
    }

    .wcss-tv-arrow {
        width: 44px;
        height: 80px;
        margin-top: -40px;
        font-size: 56px;
        line-height: 72px;
    }

    .wcss-tv-override {
        width: 94%;
        display: block;
        padding: 24px;
    }

    .wcss-tv-override-image,
    .wcss-tv-override-content {
        width: 100%;
        text-align: center;
    }

    .wcss-tv-override h2 {
        font-size: 34px;
    }

    .wcss-tv-override p {
        font-size: 22px;
    }

    .wcss-export-box {
        padding: 28px;
    }

    .wcss-export-box h1 {
        font-size: 30px;
    }
}

/* =========================================================
   SECTION 15 — TV FRONTEND PROTECTION LAYER
   Normal-user protection only.
   ========================================================= */

body.wcss-tv-body,
body.wcss-tv-body * {
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
}

body.wcss-tv-body img {
    pointer-events: none;
    -webkit-user-drag: none;
}

body.wcss-tv-body a,
body.wcss-tv-body button {
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
}

body.wcss-tv-body .wcss-tv-schedule-wrap {
    -webkit-touch-callout: none;
}

body.wcss-tv-body *:focus {
    outline: none;
}