body.shabbos-mode-active .topBar {
    display: none !important;
}

body.shabbos-mode-active {
    overflow: hidden;
    min-height: 100dvh;
}

body.shabbos-mode-active > .container-fluid {
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
    overflow: hidden;
}

body.shabbos-mode-active > .container-fluid > #index_paging {
    flex: 1 1 auto;
    min-height: 0;
}

#index_paging:has(.shabbos-mode-page) {
    display: flex;
    flex-direction: column;
    height: 100dvh;
    max-height: 100dvh;
    min-height: 0;
    overflow: hidden;
}

.shabbos-mode-page {
    --shabbos-topbar-h: 80px;
    --shabbos-bottombar-h: 60px;
    color: var(--text-color);
    font-family: var(--font-sans);
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    overflow: hidden;
    box-sizing: border-box;
    padding-bottom: var(--shabbos-bottombar-h);

    & .zmanim-content {
        border-radius: 10px;
        border: 1px solid var(--border-color);
        overflow: hidden;
        background: var(--gray-100);

        & .table.zmanim-modal__table {
            margin-bottom: 0;
            color: var(--text-color);
        }

        & tbody tr:nth-of-type(odd) {
            background: color-mix(in srgb, var(--white) 92%, var(--accent) 8%);
        }

        & tbody tr:nth-of-type(even) {
            background: var(--white);
        }

        & td {
            border-color: var(--border-color);
            vertical-align: middle;
            padding: 0.55rem 0.85rem;
        }
    }

    & .zmanim_date_text {
        text-align: center;
        font-size: 1.15rem;
        font-family: var(--font-zmanim-hebrew);
        font-weight: 600;
        color: var(--accent-darkest);
        padding-top: 0.75rem !important;
        padding-bottom: 0.75rem !important;
    }

    & .zmanim_text {
        font-family: var(--font-sans);
        font-weight: 500;
        font-size: 0.95rem;
        color: var(--text-color);
    }

    & .zmanim_text_2 {
        font-family: var(--font-zmanim-hebrew);
        font-weight: 400;
        font-size: 1.05rem;
        color: var(--gray-800);
        line-height: 1.35;
    }

    & .left_td_border {
        -webkit-border-start: 1px solid var(--border-color);
                border-inline-start: 1px solid var(--border-color);
    }

    & .zmanim-modal__attribution {
        display: block;
        text-align: end;
        margin-top: 1rem;
        font-size: 0.8rem;
        font-style: italic;
        color: var(--text-muted);

        & a {
            color: var(--accent);
            text-decoration: underline;

            &:hover {
                color: var(--accent-dark);
            }
        }
    }

    & .topMemberBar {
        top: 0;
        z-index: 1030;
    }

    & > .row.shabbos-mode-page__content {
        flex: 1 1 auto;
        min-height: 0;
        margin-left: 0;
        margin-right: 0;
        box-sizing: border-box;
        padding-top: calc(var(--shabbos-topbar-h) + 0.5rem);
        padding-bottom: 0.5rem;
        overflow: hidden;
        display: flex;
        flex-wrap: wrap;
        align-content: center;
        align-items: center;
    }

    & .shabbos-mode-page__col {
        min-height: 0;
        display: flex;
    }

    & .shabbos-zmanim-panel,
    & .shabbos-schedule-panel {
        background: var(--white);
        border: 1px solid var(--border-color);
        border-radius: 14px;
        box-shadow: 0 12px 40px var(--shadow-modal);
        overflow: hidden;
        width: 100%;
        max-width: min(520px, 100%);
        flex: 0 1 auto;
        min-height: 0;
        display: flex;
        flex-direction: column;
        margin-left: auto;
        margin-right: auto;
    }

    & .shabbos-panel__header {
        flex-shrink: 0;
        padding: 0.65rem 1rem;
        border-bottom: 1px solid var(--light);
        background: linear-gradient(
            180deg,
            color-mix(in srgb, var(--accent) 5%, var(--white)) 0%,
            var(--white) 100%
        );
        font-size: 1.125rem;
        font-weight: 700;
        text-align: center;
        letter-spacing: 0.01em;
        color: var(--text-color);
        margin: 0;
        font-family: var(--font-sans);
    }

    & .shabbos-panel__body {
        flex: 0 1 auto;
        min-height: 0;
        padding: 0.65rem 0.85rem 0.85rem;
        background: var(--white);
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    & .shabbos-zmanim-panel .zmanim-content {
        flex: 0 1 auto;
        min-height: 0;
        max-height: min(52dvh, calc(100dvh - var(--shabbos-topbar-h) - var(--shabbos-bottombar-h) - 9rem));
        overflow-y: auto;
        overscroll-behavior: contain;
    }

    & .shabbos-zmanim-panel .zmanim-modal__attribution {
        flex-shrink: 0;
        margin-top: 0.5rem;
        font-size: 0.8rem;
    }

    & .shabbos-schedule-panel__media {
        flex: 0 1 auto;
        min-height: 0;
        display: flex;
        justify-content: center;
        align-items: center;
        overflow: hidden;

        & img {
            border-radius: 10px;
            display: block;
            max-width: 100%;
            width: auto;
            height: auto;
            max-height: min(52dvh, 100%);
            -o-object-fit: contain;
               object-fit: contain;
            box-shadow: 0 4px 16px var(--shadow-card);
        }
    }

    & #zmanim_table {
        width: 100%;
        max-width: 100%;
    }

    & .zmanim-content td {
        padding: 0.35rem 0.5rem;
        font-size: 0.95rem;
    }

    & .zmanim-content .zmanim_date_text {
        font-size: 1.05rem;
        padding-top: 0.4rem !important;
        padding-bottom: 0.4rem !important;
    }

    & .transparent_button {
        background-color: transparent;
        border: 0;
        padding: 0;
        cursor: pointer;
    }

    & .shabbos-emergency-buttons__btn-img {
        width: 200px;
        height: 200px;
        -o-object-fit: contain;
           object-fit: contain;
    }

    & .shabbos-mode-title {
        font-family: var(--font-sans);
        font-weight: 700;
        font-size: 1.125rem;
        color: var(--text-color);
    }
}

