.cbt-table-wrap { margin: 0 0 28px; color: var(--cbt-body-text, #007c89); }
.cbt-title { margin: 0 0 4px; color: var(--cbt-title-color, #222); }
.cbt-day { margin: 0 0 10px; font-weight: 700; color: var(--cbt-day-color, #222); }

/* The wrapper is the only element allowed to draw the containing border. */
.cbt-responsive-table {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-style: solid;
    border-width: var(--cbt-container-border-width, 0);
    border-color: var(--cbt-container-border-color, transparent);
    border-radius: var(--cbt-container-radius, 0);
    outline: 0;
    box-shadow: none;
}

/* Reset theme/Elementor table borders so they cannot create a second hard edge. */
.cbt-responsive-table .cbt-price-table {
    width: 100%;
    margin: 0;
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 0;
    background: var(--cbt-body-bg, #fff);
    font-size: var(--cbt-font-size, 16px);
    color: var(--cbt-body-text, #007c89);
}

.cbt-responsive-table .cbt-price-table th,
.cbt-responsive-table .cbt-price-table td {
    border-top: 0 !important;
    border-left: 0 !important;
    border-right: var(--cbt-border-width, 1px) solid var(--cbt-border-color, #333) !important;
    border-bottom: var(--cbt-border-width, 1px) solid var(--cbt-border-color, #333) !important;
    padding: var(--cbt-cell-padding, 10px) calc(var(--cbt-cell-padding, 10px) + 2px);
    text-align: left;
    vertical-align: middle;
    box-shadow: none !important;
}

.cbt-responsive-table .cbt-price-table tr > *:last-child { border-right: 0 !important; }
.cbt-responsive-table .cbt-price-table tbody tr:last-child > * { border-bottom: 0 !important; }
.cbt-price-table thead th { font-weight: 700; text-transform: uppercase; background: var(--cbt-header-bg, #fff); color: var(--cbt-header-text, #007c89); }
.cbt-price-table tbody th { font-weight: 600; color: var(--cbt-body-text, #007c89); background: var(--cbt-body-bg, #fff); }
.cbt-price-table tbody td { background: var(--cbt-body-bg, #fff); color: var(--cbt-body-text, #007c89); }
.cbt-price-table tbody tr:hover th, .cbt-price-table tbody tr:hover td { background: var(--cbt-hover-bg, #f6f7f7); }
.cbt-price-table th:first-child { width: 52%; }
.cbt-price-table th:nth-child(2), .cbt-price-table th:nth-child(3) { width: 24%; }

@media (max-width: 600px) {
    .cbt-price-table { font-size: min(var(--cbt-font-size, 16px), 14px); }
    .cbt-price-table th, .cbt-price-table td { padding: 8px; }
}

/* Strongly suppress theme/Elementor outer borders when the containing border is set to 0. */
.cbt-table-wrap .cbt-responsive-table.cbt-no-container-border,
.elementor .cbt-table-wrap .cbt-responsive-table.cbt-no-container-border,
.elementor-widget-container .cbt-table-wrap .cbt-responsive-table.cbt-no-container-border {
    border: none !important;
    border-width: 0 !important;
    border-color: transparent !important;
    outline: none !important;
    box-shadow: none !important;
}

.cbt-table-wrap .cbt-responsive-table.cbt-no-container-border::before,
.cbt-table-wrap .cbt-responsive-table.cbt-no-container-border::after {
    content: none !important;
    display: none !important;
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
}

/* The plugin wrapper, not the table/theme, owns any optional outside border. */
.cbt-table-wrap .cbt-responsive-table.cbt-has-container-border {
    overflow: hidden;
}

.cbt-table-wrap .cbt-responsive-table > table.cbt-price-table,
.elementor .cbt-table-wrap .cbt-responsive-table > table.cbt-price-table,
.elementor-widget-container .cbt-table-wrap .cbt-responsive-table > table.cbt-price-table {
    border: none !important;
    border-width: 0 !important;
    outline: none !important;
    box-shadow: none !important;
}

/* Final hard reset: prevent themes and Elementor from drawing an unconfigured edge. */
.cbt-table-wrap,
.elementor .cbt-table-wrap,
.elementor-widget-container .cbt-table-wrap {
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    background-image: none !important;
}

.cbt-table-wrap::before,
.cbt-table-wrap::after,
.cbt-responsive-table::before,
.cbt-responsive-table::after,
.cbt-price-table::before,
.cbt-price-table::after {
    content: none !important;
    display: none !important;
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
}

.cbt-table-wrap .cbt-responsive-table > .cbt-price-table {
    border: 0 !important;
    border-width: 0 !important;
    border-style: none !important;
    outline: 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
}

/* Only this explicit class may draw the configurable containing border. */
.cbt-table-wrap .cbt-responsive-table.cbt-has-container-border {
    border-style: solid !important;
    border-width: var(--cbt-container-border-width, 0) !important;
    border-color: var(--cbt-container-border-color, transparent) !important;
    border-radius: var(--cbt-container-radius, 0) !important;
}

/* Opening hours table */
.cbt-opening-hours-table th:first-child { width: 35%; }
.cbt-opening-hours-table th:nth-child(2),
.cbt-opening-hours-table th:nth-child(3) { width: 32.5%; }

/* Bingo running order: compact time columns and a wider Details column. */
.cbt-running-order-table col.cbt-time-col { width: 16%; }
.cbt-running-order-table col.cbt-details-col { width: 68%; }
.cbt-running-order-table th:first-child,
.cbt-running-order-table th:nth-child(2) { width: 16%; white-space: nowrap; }
.cbt-running-order-table th:nth-child(3) { width: 68%; }

/* Regular Rewards */
.cbt-regular-rewards-group .cbt-table-wrap + .cbt-table-wrap { margin-top: 20px; }
.cbt-regular-rewards-points-wrap .cbt-price-table th,
.cbt-regular-rewards-points-wrap .cbt-price-table td { width: 50%; }
.cbt-regular-rewards-schedule-wrap .cbt-price-table { table-layout: fixed; }
.cbt-regular-rewards-schedule-wrap .cbt-price-table th:first-child,
.cbt-regular-rewards-schedule-wrap .cbt-price-table td:first-child { width: 16%; white-space: nowrap; }
.cbt-regular-rewards-schedule-wrap .cbt-price-table th:nth-child(2),
.cbt-regular-rewards-schedule-wrap .cbt-price-table td:nth-child(2),
.cbt-regular-rewards-schedule-wrap .cbt-price-table th:nth-child(3),
.cbt-regular-rewards-schedule-wrap .cbt-price-table td:nth-child(3) { width: 14%; }
.cbt-regular-rewards-schedule-wrap .cbt-price-table th:nth-child(4),
.cbt-regular-rewards-schedule-wrap .cbt-price-table td:nth-child(4) { width: 56%; }
.cbt-reward-date-day,
.cbt-reward-date-value { display: block; }
.cbt-reward-date-day { font-weight: 600; margin-bottom: 2px; }

/* Regular Rewards schedule stacked by date */
.cbt-regular-rewards-schedule-wrap .cbt-regular-rewards-schedule-table { table-layout: fixed; }
.cbt-regular-rewards-schedule-wrap .cbt-regular-rewards-schedule-table col.cbt-reward-daytime-col,
.cbt-regular-rewards-schedule-wrap .cbt-regular-rewards-schedule-table col.cbt-reward-evening-col { width: 50%; }
.cbt-regular-rewards-schedule-wrap .cbt-reward-date-row th {
    text-align: left;
    background: var(--cbt-body-bg);
    color: var(--cbt-body-text);
    font-weight: 600;
    border-top: 0 !important;
    border-right: 0 !important;
    border-bottom: 0 !important;
    border-left: 0 !important;
}
.cbt-regular-rewards-schedule-wrap .cbt-reward-group-last > * { border-bottom: 0 !important; }
.cbt-regular-rewards-schedule-wrap .cbt-reward-date-day { display: inline; margin: 0 .45em 0 0; font-weight: 600; }
.cbt-regular-rewards-schedule-wrap .cbt-reward-date-value { display: inline; }
.cbt-regular-rewards-schedule-wrap .cbt-reward-column-headings th,
.cbt-regular-rewards-schedule-wrap .cbt-reward-details-heading th {
    background: var(--cbt-header-bg);
    color: var(--cbt-header-text);
    text-align: left;
}
.cbt-regular-rewards-schedule-wrap .cbt-reward-details-row td { width: 100%; }
.cbt-regular-rewards-schedule-list { display: grid; gap: 20px; }
.cbt-regular-rewards-date-layout.cbt-has-image {
    display: grid;
    grid-template-columns: minmax(90px, 17%) minmax(0, 1fr);
    gap: 20px;
    align-items: center;
}
.cbt-regular-rewards-date-image-wrap { min-width: 0; }
.cbt-regular-rewards-date-image {
    display: block;
    width: 100%;
    height: auto;
}
.cbt-regular-rewards-date-layout.cbt-has-image .cbt-responsive-table { min-width: 0; }

@media (max-width: 720px) {
    .cbt-regular-rewards-date-layout.cbt-has-image { grid-template-columns: minmax(0, 1fr); }
    .cbt-regular-rewards-date-image { width: 50%; margin-inline: auto; }
}
