/*
 * Bookly Staff Cabinet — staff schedule layout v4
 * Scoped to the bookly-staff-schedule shortcode only.
 * Visual-only adjustments. No schedule or break saving logic is changed.
 */

#bookly-tbs.bookly-staff-cabinet-schedule .bookly-js-range-row {
    box-sizing: border-box !important;
    margin: 0 0 10px !important;
    padding: 8px 10px !important;
    border: 1px solid #deebe7 !important;
    border-radius: 9px !important;
    background: #fcfefd !important;
    box-shadow: 0 1px 2px rgba(24, 75, 67, .035) !important;
    min-width: 0 !important;
    transition: background-color .15s ease, border-color .15s ease;
}

#bookly-tbs.bookly-staff-cabinet-schedule .bookly-js-range-row:hover {
    background: #f4faf8 !important;
    border-color: #cde2db !important;
}

#bookly-tbs.bookly-staff-cabinet-schedule .bookly-js-range-day {
    color: #28504c !important;
    font-weight: 600 !important;
    white-space: nowrap !important;
}

#bookly-tbs.bookly-staff-cabinet-schedule .bookly-js-range-times {
    display: flex !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    gap: 5px !important;
    min-width: 0 !important;
    max-width: 100% !important;
}

#bookly-tbs.bookly-staff-cabinet-schedule .bookly-js-range-times .bookly-js-range-field {
    min-width: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

#bookly-tbs.bookly-staff-cabinet-schedule .bookly-js-range-times .bookly-js-range-field > select {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    min-height: 36px !important;
    direction: ltr !important;
    text-align: center !important;
    padding: 5px 27px 5px 8px !important;
    border: 1px solid #cbded8 !important;
    border-radius: 7px !important;
    background-color: #fff !important;
    color: #294844 !important;
    box-sizing: border-box !important;
    box-shadow: none !important;
    font-family: inherit !important;
    line-height: 1.4 !important;
}

#bookly-tbs.bookly-staff-cabinet-schedule .bookly-js-range-times .bookly-js-range-field > select:focus {
    border-color: #4c9b8e !important;
    outline: none !important;
    box-shadow: 0 0 0 2px rgba(76, 155, 142, .13) !important;
}

#bookly-tbs.bookly-staff-cabinet-schedule .bookly-js-range-separator {
    flex: 0 0 auto !important;
    margin: 0 2px !important;
    color: #6d8580 !important;
    white-space: nowrap !important;
}

#bookly-tbs.bookly-staff-cabinet-schedule .bookly-js-breaks-wrapper {
    align-items: center !important;
    gap: 4px !important;
    width: auto !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

#bookly-tbs.bookly-staff-cabinet-schedule .bookly-js-breaks-wrapper .bookly-js-toggle-popover {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 34px !important;
    margin: 0 !important;
    padding: 6px 11px !important;
    border: 1px solid #c9e2db !important;
    border-radius: 8px !important;
    background: #edf8f4 !important;
    color: #176b63 !important;
    box-shadow: 0 1px 2px rgba(23, 107, 99, .06) !important;
    font-family: inherit !important;
    font-weight: 600 !important;
    line-height: 1.35 !important;
    white-space: nowrap !important;
    text-decoration: none !important;
    transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
}

#bookly-tbs.bookly-staff-cabinet-schedule .bookly-js-breaks-wrapper .bookly-js-toggle-popover:hover,
#bookly-tbs.bookly-staff-cabinet-schedule .bookly-js-breaks-wrapper .bookly-js-toggle-popover:focus {
    border-color: #9dcfc2 !important;
    background: #e2f3ed !important;
    color: #125a54 !important;
    box-shadow: 0 0 0 2px rgba(76, 155, 142, .10) !important;
}


/* A non-working day has no break control on any viewport. Do not force a display mode
   on the wrapper/column elsewhere; Bookly's own hidden state must remain respected. */
#bookly-tbs.bookly-staff-cabinet-schedule .bookly-js-range-row.bookly-sc-day-off > .col-12.col-lg-4,
#bookly-tbs.bookly-staff-cabinet-schedule .bookly-js-range-row.bookly-sc-day-off .bookly-js-breaks-wrapper {
    display: none !important;
}

/* DESKTOP: keep the break control next to the time controls rather than in a wide 4-column block. */
@media (min-width: 1024px) {
    #bookly-tbs.bookly-staff-cabinet-schedule .bookly-js-range-row {
        display: flex !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        justify-content: center !important;
        column-gap: 0 !important;
    }

    #bookly-tbs.bookly-staff-cabinet-schedule .bookly-js-range-row > .col-12.col-lg-8 {
        display: block !important;
        flex: 0 1 auto !important;
        width: auto !important;
        max-width: none !important;
        min-width: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    #bookly-tbs.bookly-staff-cabinet-schedule .bookly-js-range-row > .col-12.col-lg-8 > .form-row {
        display: flex !important;
        flex: 0 1 auto !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        justify-content: center !important;
        width: auto !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        min-width: 0 !important;
    }

    #bookly-tbs.bookly-staff-cabinet-schedule .bookly-js-range-day {
        flex: 0 0 90px !important;
        width: 90px !important;
        max-width: 90px !important;
        padding-left: 0 !important;
        padding-right: 10px !important;
    }

    #bookly-tbs.bookly-staff-cabinet-schedule .bookly-js-range-day + .col-auto {
        flex: 0 1 auto !important;
        width: auto !important;
        max-width: none !important;
        min-width: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    #bookly-tbs.bookly-staff-cabinet-schedule .bookly-js-range-times .bookly-js-range-field {
        flex: 0 0 100px !important;
        width: 100px !important;
        min-width: 100px !important;
        max-width: 100px !important;
    }

    #bookly-tbs.bookly-staff-cabinet-schedule .bookly-js-range-row > .col-12.col-lg-4 {
        flex: 0 0 auto !important;
        width: auto !important;
        max-width: none !important;
        min-width: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        margin-inline-start: 9px !important;
    }
}

/* TABLET: natural-width columns with a safe wrap if the row becomes narrow. */
@media (min-width: 768px) and (max-width: 1023px) {
    #bookly-tbs.bookly-staff-cabinet-schedule .bookly-js-range-row {
        display: flex !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        justify-content: center !important;
    }

    #bookly-tbs.bookly-staff-cabinet-schedule .bookly-js-range-row > .col-12.col-lg-8 {
        flex: 0 1 auto !important;
        width: auto !important;
        max-width: 100% !important;
        min-width: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    #bookly-tbs.bookly-staff-cabinet-schedule .bookly-js-range-row > .col-12.col-lg-8 > .form-row {
        display: flex !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        width: auto !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    #bookly-tbs.bookly-staff-cabinet-schedule .bookly-js-range-day {
        flex: 0 0 75px !important;
        width: 75px !important;
        max-width: 75px !important;
        padding-left: 0 !important;
        padding-right: 8px !important;
    }

    #bookly-tbs.bookly-staff-cabinet-schedule .bookly-js-range-day + .col-auto {
        flex: 0 1 auto !important;
        width: auto !important;
        max-width: 100% !important;
        min-width: 0 !important;
        padding: 0 !important;
    }

    #bookly-tbs.bookly-staff-cabinet-schedule .bookly-js-range-times .bookly-js-range-field {
        flex: 0 1 100px !important;
        width: 100px !important;
        min-width: 82px !important;
        max-width: 110px !important;
    }

    #bookly-tbs.bookly-staff-cabinet-schedule .bookly-js-range-row > .col-12.col-lg-4 {
        flex: 0 0 auto !important;
        width: auto !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        margin-inline-start: 8px !important;
    }
}

/* MOBILE: hours first; break control sits below with breathing room. */
@media (max-width: 767px) {
    #bookly-tbs.bookly-staff-cabinet-schedule .bookly-js-range-row {
        display: flex !important;
        flex-wrap: wrap !important;
        align-items: flex-start !important;
        row-gap: 8px !important;
    }

    #bookly-tbs.bookly-staff-cabinet-schedule .bookly-js-range-row > .col-12.col-lg-8 {
        display: block !important;
        flex: 1 1 100% !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    #bookly-tbs.bookly-staff-cabinet-schedule .bookly-js-range-row > .col-12.col-lg-8 > .form-row {
        display: flex !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        min-width: 0 !important;
    }

    #bookly-tbs.bookly-staff-cabinet-schedule .bookly-js-range-day {
        flex: 0 0 62px !important;
        width: 62px !important;
        max-width: 62px !important;
        padding-left: 0 !important;
        padding-right: 5px !important;
        white-space: nowrap !important;
    }

    #bookly-tbs.bookly-staff-cabinet-schedule .bookly-js-range-day + .col-auto {
        flex: 1 1 auto !important;
        width: auto !important;
        max-width: 100% !important;
        min-width: 0 !important;
        padding: 0 !important;
    }

    #bookly-tbs.bookly-staff-cabinet-schedule .bookly-js-range-times {
        display: flex !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        gap: 5px !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
    }

    #bookly-tbs.bookly-staff-cabinet-schedule .bookly-js-range-times .bookly-js-range-field {
        flex: 1 1 84px !important;
        width: auto !important;
        min-width: 80px !important;
        max-width: 130px !important;
    }

    #bookly-tbs.bookly-staff-cabinet-schedule .bookly-js-range-times .bookly-js-range-field > select {
        min-height: 38px !important;
        direction: ltr !important;
        text-align: center !important;
        padding: 5px 27px 5px 8px !important;
    }

    #bookly-tbs.bookly-staff-cabinet-schedule .bookly-js-range-row > .col-12.col-lg-4 {
        flex: 0 0 100% !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin-top: 0 !important;
        padding: 7px 0 0 !important;
        border-top: 1px solid #e2eeea !important;
        box-sizing: border-box !important;
    }

    #bookly-tbs.bookly-staff-cabinet-schedule .bookly-js-breaks-wrapper {
        align-items: center !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        margin-inline-start: 67px !important;
        margin-top: 0 !important;
    }

}
