/* ============================================================
   DS Schedule Page — Custom Redesign Styles
   ============================================================ */

/* ---- Modal z-index above sidebar drawer ---- */
.modal,
.ui-dialog {
    z-index: 1060 !important;
}
.modal-backdrop,
.ui-widget-overlay {
    z-index: 1055 !important;
}

/* ---- Ads ---- */
.ad-leaderboard-placeholder {
    margin-left: auto;
    margin-right: auto;
}

/* ---- Color key legend ---- */
.schedule-legend {
    display: flex;
    gap: 16px;
    align-items: center;
    justify-content: flex-end;
    font-size: 13px;
    margin-bottom: 10px;
}
.schedule-legend__label {
    font-weight: 700;
}
.schedule-legend__item {
    display: flex;
    align-items: center;
    gap: 5px;
}
.schedule-legend__dot {
    font-size: 12px;
}
.schedule-legend__dot--home {
    color: #FDA51A;
}
.schedule-legend__dot--away {
    color: #165891;
}

/* ---- Schedule table overrides ---- */
table.schedule-table .add-event-info {
    color: #012148 !important;
}
table.schedule-table .event-info {
    font-weight: 600 !important;
    text-transform: none !important;
}
table.schedule-table .event-info a {
    color: #165891 !important;
    text-decoration: none;
}
table.schedule-table td strong {
    font-size: 1em;
    color: #000;
}

/* ---- Action bar ---- */
.action-bar {
    padding: 1em 0;
    border-bottom: 1px solid #e5e5e5;
    margin-bottom: 10px;
}
.action-bar .flex {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    width: 100%;
}
.action-bar .flex .flex-item {
    padding: 0;
}
.action-bar .btn-outline {
    background: transparent;
}
.action-bar .btn-outline.btn-primary {
    border: 1px solid #012148;
    color: #012148;
}
.action-bar .btn-outline.btn-primary:hover,
.action-bar .btn-outline.btn-primary:focus,
.action-bar .btn-outline.btn-primary.active {
    color: #fff !important;
    background: #012148;
    text-decoration: none !important;
}
.action-bar .form-control {
    height: 34px;
    padding: 6px 10px;
    display: inline-block;
    width: auto;
}

/* ---- Global layout overrides ---- */
.container-fluid {
    min-width: 0;
}
.footer-nav--bottom {
    background: #012d61;
}
.footer-nav__branding {
    background-image: url("https://digitalsports-staging.com/wp-content/themes/digital_sports/assets/images/logo.digitalsports-poweredby-white.svg") !important;
}

.page-header .title-header {
    border-left: 0px !important;
     padding-left: 0px !important;
 }

/* ---- Mobile offcanvas drawer ---- */
@media (max-width: 767px) {
    .schoolContainer-statsAd {
        display: none !important;
    }

    .page-header .title-header {
        text-align: center !important;
    }

    .schedule-container .col-md-4 {
        position: fixed;
        top: 0;
        right: -100%;
        width: 85%;
        max-width: 340px;
        height: 100%;
        overflow-y: auto;
        background: #fff;
        z-index: 1050;
        transition: right 0.3s ease;
        padding: 15px;
        box-shadow: -3px 0 10px rgba(0,0,0,0.3);
    }
    .schedule-container .col-md-4.drawer-open {
        right: 0;
    }
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0; left: 0; right: 0; bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 1040;
    }
    .sidebar-overlay.active {
        display: block;
    }
    .mobile-filter-trigger {
        margin-top: 15px;
        margin-bottom: 10px;
    }
    .mobile-filter-trigger .btn {
        display: block;
        width: 100%;
        padding: 10px 14px;
        font-size: 15px;
        font-weight: 600;
        background-color: #012148;
        color: #fff;
        border-color: #012148;
        border-radius: 3px;
        text-align: center;
    }
    .mobile-filter-trigger .btn:hover,
    .mobile-filter-trigger .btn:focus {
        background-color: #01193a;
        border-color: #01193a;
        color: #fff;
    }
    .drawer-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        background-color: #012148;
        color: #fff;
        padding: 10px 12px;
        margin: -15px -15px 15px -15px;
    }
    .drawer-header__title {
        font-size: 16px;
        font-weight: 700;
        margin: 0;
        letter-spacing: 0.03em;
    }
    .drawer-close-btn {
        font-size: 24px;
        line-height: 1;
        cursor: pointer;
        color: #fff;
        background: none;
        border: none;
        padding: 0 2px;
        opacity: 0.85;
    }
    .drawer-close-btn:hover {
        opacity: 1;
    }
    .schedule-container .col-md-4 [style*="position: sticky"],
    .schedule-container .col-md-4 [style*="position:sticky"] {
        position: static !important;
    }

    #ablumLoadingInProgress {
        display: inline-block !important;
        width: auto !important;
        max-width: 100% !important;
        margin: 30px 0;
    }

    /* Page header */
    .page-header {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    /* Action bar */
    .action-bar .col-sm-4 {
        margin-top: 1rem;
    }
    .action-bar .col-sm-4 .btn-group {
        display: flex;
        width: 100%;
    }
    .action-bar .col-sm-4 .btn-group .btn {
        flex: 1;
    }

    /* Schedule table — responsive stacked columns */
    table.schedule-table:not(.schedule-table--no-event),
    table.schedule-table:not(.schedule-table--no-event) tbody {
        display: block !important;
        width: 100% !important;
    }
    table.schedule-table:not(.schedule-table--no-event) thead {
        display: none !important;
    }
    table.schedule-table:not(.schedule-table--no-event) tbody tr {
        display: block !important;
        width: 100% !important;
        border-bottom: 2px solid #ddd;
        margin-bottom: 0 !important;
        padding-bottom: 4px;
    }
    table.schedule-table:not(.schedule-table--no-event) td {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        min-height: 0 !important;
        box-sizing: border-box !important;
        text-align: left !important;
        padding: 6px 10px 6px 38% !important;
        position: relative !important;
        border-bottom: 1px solid #f0f0f0;
    }
    table.schedule-table:not(.schedule-table--no-event) td::before {
        position: absolute;
        left: 10px;
        top: 7px;
        width: 34%;
        font-weight: 700;
        font-size: 11px;
        text-transform: uppercase;
        color: #012148;
        white-space: nowrap;
    }
    table.schedule-table:not(.schedule-table--no-event) td:nth-child(1)::before {
        content: "Time";
    }
    table.schedule-table:not(.schedule-table--no-event) td:nth-child(2)::before {
        content: "Event";
    }
    table.schedule-table:not(.schedule-table--no-event) td:nth-child(3)::before {
        content: "Details";
    }
}

@media (min-width: 768px) {
    .mobile-filter-trigger,
    .drawer-header {
        display: none;
    }
}
