:root {
    --shabbos-call-decline: #f54242;
    --shabbos-call-accept: #071243;
    --shabbos-call-track-bg: #e5e5e5;
}

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;
}

body.shabbos-mode-active #bottomMemberBarId {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 1030;
}

#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);

    & .topMemberBar {
        top: 0;
        z-index: 1030;
        background: var(--field-bg);
        border-bottom: 1px solid var(--border-color);
        box-shadow: 0 2px 8px var(--shadow-subtle);
        border-radius: 0 0 var(--control-bar-radius) var(--control-bar-radius);
        overflow: hidden;
    }

    & > .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: auto;
        display: flex;
        flex-wrap: wrap;
        align-content: center;
        align-items: center;
    }

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

    & .shabbos-zmanim-panel,
    & .shabbos-schedule-panel {
        background: var(--field-bg);
        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;
        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(--color-light)) 0%,
            var(--color-light) 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;
        padding: 0.65rem 0.85rem 0.85rem;
        background: var(--field-bg);
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    & .shabbos-zmanim-panel .zmanim-content {
        flex: 0 1 auto;
        overflow-y: visible;
    }

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

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

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

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

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

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

    & .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);
    }

    & .shabbos-clockbar-container {
        margin-bottom: 2.5rem;
    }

    @media (max-width: 767px) {
        & .shabbos-mode-title {
            font-size: 0.82rem;
            text-align: center;
            line-height: 1.15;
        }
    }
}

.portrait_shabbos_schedule_size {
    width: 95%;
    max-width: 99%;
}

.landscape_shabbos_schedule_size {
    width: 95%;
    max-width: 99%;
}

.hangup_button {
    background-color: var(--shabbos-call-decline);
    color: var(--white-fixed);
    opacity: 1;
    border: double 10px transparent;
    font-size: 20px;
    height: 60px;
    width: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;

    &:focus {
        background-color: var(--shabbos-call-decline);
        color: var(--white-fixed);
        opacity: 1;
    }

    &:hover {
        background-color: var(--shabbos-call-accept);
        color: var(--white-fixed);
        opacity: 1;
    }
}

.shabbos-call-modal {
    & .modal-content {
        overflow: hidden;
    }

    & .modal-body {
        display: flex;
        flex-direction: column;
        gap: 18px;
    }

    & .shabbos-call-modal__slider-section {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding: 4px 0 8px;
    }

    & .center_body {
        width: 100%;
    }

    & .hangup_button {
        width: 100%;
        max-width: 200px;
        height: 48px;
        font-size: 16px;
        margin: 0 auto;
    }

    & .shabbos-call-modal__location {
        background: var(--gray-100);
        border: 1px solid var(--border-color);
        border-radius: 12px;
        padding: 16px;
        text-align: center;
    }

    & .shabbos-call-modal__location-label {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        color: var(--text-muted);
        font-size: 0.78rem;
        font-weight: 700;
        letter-spacing: 0.04em;
        text-transform: uppercase;
        margin-bottom: 8px;
    }

    & .shabbos-call-modal__location-name {
        color: var(--text-color);
        font-size: 1.1rem;
        font-weight: 700;
    }

    & .shabbos-call-modal__location-address,
    & .shabbos-call-modal__location-phone {
        color: var(--text-color);
        font-size: 0.95rem;
        margin-top: 4px;
    }

    & .shabbos-call-modal__incoming-icon {
        display: flex;
        justify-content: center;
        color: var(--accent);
    }

    & .shabbos-call-modal__incoming-caller {
        text-align: center;
        color: var(--text-color);
        font-size: 1.3rem;
        font-weight: 700;
    }

    & .shabbos-call-modal__incoming-actions {
        display: flex;
        gap: 12px;
    }

    & .shabbos-call-modal__accept-btn,
    & .shabbos-call-modal__reject-btn {
        flex: 1 1 0;
        justify-content: center;
    }

    & .shabbos-call-modal__accept-btn {
        background: var(--shabbos-call-accept);
        border-color: var(--shabbos-call-accept);
    }

    & .shabbos-call-modal__reject-btn {
        color: var(--shabbos-call-decline);
        border-color: var(--shabbos-call-decline);
    }

    & .shabbos-call-modal__hangup-btn {
        width: 100%;
    }
}

.center_body {
    display: flex;
    align-items: center;
    justify-content: center;
}

#button-background {
    position: relative;
    background-color: var(--shabbos-call-track-bg);
    width: min(400px, 100%);
    height: 80px;
    border: var(--white-fixed);
    border-radius: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-red,
.slider-blue {
    transition: width 0.3s, border-radius 0.3s, height 0.3s;
    position: absolute;
    top: 0;
    left: -10px;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-red {
    background-color: var(--shabbos-call-decline);
}

.slider-blue {
    background-color: var(--shabbos-call-accept);
}

#slider.unlock_me {
    transition: all 0.3s;
    inset: 0;
    width: auto;
    height: auto;
    border-radius: inherit;
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 700;
    text-align: center;
    padding: 0 20px;
    line-height: 1.25;
}

#button-background:has(.emer_slider.unlock_me) {
    height: 64px;
}

#button-background:has(.emer_slider.unlock_me) .slide-text {
    opacity: 0;
}

#slide-text-red,
#slide-text-blue {
    font-size: 18px;
    font-family: var(--font-sans);
    font-weight: 800;
    -webkit-user-select: none;
       -moz-user-select: none;
            user-select: none;
    cursor: default;
}

#slide-text-red {
    color: var(--shabbos-call-decline);
}

#slide-text-blue {
    color: var(--shabbos-call-accept);
}

