/* WPBC remains the real form field, but only the existing 2Way card design is visible. */
.booking_form_div select[name^="rangetime"],
.booking_form_div .wpbc_times_selector,
.booking_form_div .twm-times-ui {
    display: none !important;
}

.twoway_has_custom_picker > .wpbc_times_selector {
    display: none !important;
}

.twoway_custom_times_wrap {
    margin-top: 12px;
}

.twoway_time_section {
    margin-bottom: 18px;
}

.twoway_time_section_title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 10px 0;
}

/*
 * Old-browser-safe two-column layout.
 * Works without CSS Grid or Flexbox.
 */
.twoway_time_grid {
    overflow: hidden;
    margin-left: -1%;
    margin-right: -1%;
}

.twoway_time_grid:after {
    content: "";
    display: block;
    clear: both;
}

.twoway_time_grid .twoway_time_item {
    float: left;
    width: 48%;
    margin: 0 1% 8px;
}

.twoway_time_item {
    position: relative;
    padding: 14px 12px;
    border: 1px solid #b97b14;
    border-radius: 4px;
    background: #fff;
    text-align: center;
    font-size: 15px;
    line-height: 1.2;
    cursor: pointer;
    box-sizing: border-box;
}

.twoway_time_item.twoway_time_selected {
    background: #d79618;
    color: #fff;
    border-color: #d79618;
    font-weight: 700;
}

.twoway_time_item_booked {
    background: #efefef;
    color: #9a9a9a;
    border: 1px solid #d4d4d4;
    cursor: not-allowed;
    text-decoration: line-through;
    padding-top: 26px;
}

.twoway_booked_badge {
    position: absolute;
    top: 6px;
    right: 6px;
    padding: 4px 8px;
    border-radius: 999px;
    background: #d79618;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    text-decoration: none;
}

.twoway_empty_note {
    padding: 10px 12px;
    border: 1px dashed #d0d0d0;
    border-radius: 6px;
    background: #fafafa;
    color: #777;
    font-size: 12px;
}

.twm-calendar-is-preloading {
    position: relative;
    pointer-events: none;
}

.twm-calendar-preload-overlay {
    position: absolute;
    inset: 0;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(255, 255, 255, 0.88);
    text-align: center;
    font-weight: 600;
}

@media (max-width: 768px) {
    .twoway_time_grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 5px;
    }

    .twoway_time_item {
        padding: 16px 8px;
        font-size: 15px;
        line-height: 1.2;
    }

    .twoway_time_item_booked {
        padding-top: 22px;
    }

    .twoway_booked_badge {
        top: 5px;
        right: 5px;
        font-size: 9px;
        padding: 3px 7px;
    }
}



/*
 * Fully booked warning.
 * Uses table/table-cell instead of modern Flexbox.
 */
#twm-all-times-booked-error {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 99999999;
    display: table;
    width: 100%;
    height: 100%;
    background: #000000;
    background: rgba(0, 0, 0, 0.82);
}

.twm-all-times-booked-cell {
    display: table-cell;
    padding: 20px;
    vertical-align: middle;
    text-align: center;
}

.twm-all-times-booked-box {
    display: inline-block;
    width: 90%;
    max-width: 440px;
    padding: 26px 20px;
    border: 4px solid #d71920;
    border-radius: 16px;
    background: #ffffff;
    color: #111111;
    text-align: center;
    box-sizing: border-box;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.45);
}

.twm-all-times-booked-icon {
    width: 58px;
    height: 58px;
    margin: 0 auto 14px;
    border-radius: 50%;
    background: #d71920;
    color: #ffffff;
    font-size: 40px;
    font-weight: 900;
    line-height: 58px;
    text-align: center;
}

.twm-all-times-booked-title {
    margin-bottom: 10px;
    color: #d71920;
    font-size: 25px;
    font-weight: 900;
    line-height: 1.2;
}

.twm-all-times-booked-message {
    margin-bottom: 10px;
    color: #222222;
    font-size: 17px;
    line-height: 1.45;
}

.twm-all-times-booked-not-sent {
    margin-bottom: 18px;
    color: #d71920;
    font-size: 17px;
    font-weight: 800;
    line-height: 1.3;
}

#twm-all-times-booked-close {
    width: 100%;
    padding: 13px 18px;
    border: 0;
    border-radius: 24px;
    background: #d79618;
    color: #ffffff;
    font-size: 17px;
    font-weight: 800;
    cursor: pointer;
}