﻿.doctor-schedule-page {
    width: min(1500px, calc(100% - 28px));
    margin: 28px auto 52px;
}

.doctor-schedule-filter {
    display: grid;
    grid-template-columns: repeat(5, minmax(130px, 1fr)) auto;
    gap: 12px;
    align-items: end;
    margin-bottom: 16px;
    padding: 16px;
    background: #fff;
    border: 1px solid #d8e6e8;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(23, 80, 89, .06);
}

.doctor-schedule-filter > div {
    display: grid;
    gap: 5px;
}

.doctor-schedule-filter label {
    font-weight: 800;
    color: #31545a;
}

.doctor-schedule-filter select,
.doctor-schedule-filter input {
    min-height: 43px;
    border: 1px solid #c7dade;
    border-radius: 10px;
    padding: 8px 10px;
    background: #fff;
}

.doctor-schedule-filter button,
.schedule-period-navigation a {
    min-height: 43px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 10px;
    padding: 9px 16px;
    background: var(--site-action-bg, #0f6972);
    color: var(--site-action-text, #fff);
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .18s ease, color .18s ease, transform .18s ease;
}

.doctor-schedule-filter button:hover,
.doctor-schedule-filter button:focus,
.schedule-period-navigation a:hover,
.schedule-period-navigation a:focus {
    background: var(--site-action-hover-bg, #0b535c);
    color: var(--site-action-text, #fff);
}

.schedule-period-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.schedule-board {
    --schedule-bg: #0f6972;
    --schedule-overlay: #073b47;
    --schedule-image-opacity: .22;
    --schedule-overlay-opacity: .42;
    --schedule-header-bg: #0d5e68;
    --schedule-header-text: #fff;
    --schedule-doctor-bg: #0a5962;
    --schedule-doctor-text: #fff;
    --schedule-day-bg: #fff;
    --schedule-day-text: #0f6972;
    --schedule-slot-bg: #eaf7f7;
    --schedule-slot-text: #0b535c;
    --schedule-empty-bg: #fff;
    --schedule-empty-text: #91a5aa;
    --schedule-border: #bbdadd;
    --schedule-accent: #69be45;
    --schedule-font: Cairo;
    --schedule-title-size: 34px;
    --schedule-body-size: 16px;
    --schedule-radius: 18px;
    --schedule-cell-height: 72px;
    --schedule-aspect: auto;
    --schedule-background-image: none;

    position: relative;
    isolation: isolate;
    overflow: hidden;
    min-height: 520px;
    aspect-ratio: var(--schedule-aspect);
    padding: clamp(18px, 3vw, 42px);
    color: #fff;
    background: var(--schedule-bg);
    border-radius: var(--schedule-radius);
    font-family: var(--schedule-font), Arial, sans-serif;
    font-size: var(--schedule-body-size);
    box-shadow: 0 20px 55px rgba(3, 49, 57, .22);
}

.schedule-board-background,
.schedule-board-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.schedule-board-background {
    z-index: -2;
    background-image: var(--schedule-background-image);
    background-size: cover;
    background-position: center;
    opacity: var(--schedule-image-opacity);
}

.schedule-board-overlay {
    z-index: -1;
    background: var(--schedule-overlay);
    opacity: var(--schedule-overlay-opacity);
}

.schedule-board-content {
    position: relative;
    z-index: 1;
}

.schedule-board-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 22px;
}

.schedule-eyebrow {
    display: inline-flex;
    margin-bottom: 7px;
    color: var(--schedule-accent);
    font-weight: 900;
}

.schedule-board-header h1,
.schedule-board-header h2 {
    margin: 0;
    max-width: 900px;
    font-size: var(--schedule-title-size);
    line-height: 1.25;
    color: var(--schedule-header-text);
}

.schedule-board-header p {
    max-width: 850px;
    margin: 9px 0 0;
    opacity: .9;
}

.schedule-board-logo {
    width: min(150px, 18vw);
    max-height: 100px;
    object-fit: contain;
    padding: 8px;
    background: rgba(255, 255, 255, .92);
    border-radius: calc(var(--schedule-radius) * .75);
}

.schedule-matrix-scroll {
    overflow-x: auto;
    padding-bottom: 6px;
}

.schedule-matrix {
    width: 100%;
    min-width: 960px;
    border-collapse: separate;
    border-spacing: 6px;
    table-layout: fixed;
}

.schedule-matrix th,
.schedule-matrix td {
    min-height: var(--schedule-cell-height);
    padding: 10px;
    text-align: center;
    vertical-align: middle;
    border: 1px solid var(--schedule-border);
    border-radius: calc(var(--schedule-radius) * .55);
}

.schedule-matrix thead th {
    color: var(--schedule-header-text);
    background: var(--schedule-header-bg);
}

.schedule-matrix thead th span,
.schedule-matrix thead th small {
    display: block;
}

.schedule-matrix thead th small {
    margin-top: 4px;
    opacity: .8;
}


.schedule-specialty-row th {
    padding: 11px 16px;
    text-align: start;
    color: var(--schedule-header-text);
    background: color-mix(in srgb, var(--schedule-header-bg) 88%, var(--schedule-accent));
    border-inline-start: 6px solid var(--schedule-accent);
    font-size: 1.05em;
}

.schedule-doctor-heading,
.schedule-doctor-cell {
    width: 230px;
}

.schedule-doctor-cell {
    color: var(--schedule-doctor-text);
    background: var(--schedule-doctor-bg);
}

.schedule-doctor-name-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: start;
}

.schedule-doctor-name-wrap img {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    object-fit: cover;
    border-radius: 50%;
    background: #fff;
}

.schedule-doctor-name-wrap span {
    min-width: 0;
}

.schedule-doctor-name-wrap strong,
.schedule-doctor-name-wrap small {
    display: block;
}

.schedule-doctor-name-wrap small {
    margin-top: 3px;
    opacity: .82;
}

.schedule-has-slots {
    background: var(--schedule-day-bg);
    color: var(--schedule-day-text);
}

.schedule-slot {
    display: grid;
    gap: 3px;
    margin: 4px 0;
    padding: 9px 8px;
    color: var(--schedule-slot-text);
    background: var(--schedule-slot-bg);
    border-radius: calc(var(--schedule-radius) * .45);
    border-inline-start: 4px solid var(--schedule-accent);
}

.schedule-slot strong,
.schedule-slot span,
.schedule-slot small {
    display: block;
}

.schedule-slot small {
    opacity: .8;
}

.schedule-slot-note {
    margin-top: 3px;
    padding-top: 3px;
    border-top: 1px dashed color-mix(in srgb, currentColor 30%, transparent);
}

.schedule-empty-cell {
    color: var(--schedule-empty-text);
    background: var(--schedule-empty-bg);
}

.schedule-empty-mark {
    font-size: 1.35rem;
}

.schedule-no-data {
    padding: 40px !important;
    color: var(--schedule-day-text);
    background: var(--schedule-day-bg);
    font-weight: 800;
}

.schedule-board-footer {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    margin-top: 20px;
    padding: 15px 18px;
    color: var(--schedule-header-text);
    background: color-mix(in srgb, var(--schedule-header-bg) 82%, transparent);
    border-radius: calc(var(--schedule-radius) * .7);
}

.schedule-board-footer small {
    max-width: 720px;
}

@media print {
    body * {
        visibility: hidden;
    }

    .schedule-board,
    .schedule-board * {
        visibility: visible;
    }

    .schedule-board {
        position: absolute;
        inset: 0;
        width: 100%;
        min-height: 100vh;
        border-radius: 0;
        box-shadow: none;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    .doctor-schedule-filter,
    .schedule-period-navigation {
        display: none !important;
    }
}

@media (max-width: 1100px) {
    .doctor-schedule-filter {
        grid-template-columns: repeat(3, minmax(140px, 1fr));
    }
}

@media (max-width: 720px) {
    .doctor-schedule-page {
        width: min(100% - 16px, 1500px);
        margin-top: 16px;
    }

    .doctor-schedule-filter {
        grid-template-columns: 1fr 1fr;
    }

    .schedule-period-navigation {
        flex-wrap: wrap;
        justify-content: center;
    }

    .schedule-board {
        padding: 16px;
    }

    .schedule-board-header {
        align-items: center;
    }

    .schedule-board-header h1,
    .schedule-board-header h2 {
        font-size: clamp(24px, 7vw, var(--schedule-title-size));
    }

    .schedule-board-footer {
        flex-direction: column;
    }
}

@media (max-width: 460px) {
    .doctor-schedule-filter {
        grid-template-columns: 1fr;
    }

    .schedule-board-logo {
        width: 90px;
    }
}
