.cmacal{border:1px solid #ddd;padding:1rem;margin:0 0 1rem}
.cmacal-table{display:flex;flex-direction:column;border:1px solid #e3e3e3}
.cmacal-row{display:grid;grid-template-columns:2.2fr 2.2fr 1.2fr 1.2fr;gap:.75rem;align-items:center;min-height:3rem;padding:.5rem .75rem;border-top:1px solid #eee;cursor:pointer;margin:0}
.cmacal-row:first-child{border-top:0}
.cmacal-head{font-weight:600;font-size:.85em;background:#f7f7f7;cursor:default;min-height:auto}
.cmacal-row.is-disabled{opacity:.55;cursor:not-allowed}
.cmacal-row:has(input:checked){background:#f2f7ff}
.cmacal-seats{text-align:right}
.cmacal-full{color:#a00}
@media (max-width:640px){
 .cmacal-head{display:none}
 .cmacal-row{grid-template-columns:1fr;gap:.15rem}
 .cmacal-seats{text-align:left}
 .cmacal-time,.cmacal-venue,.cmacal-seats{padding-left:1.6rem;font-size:.9em}
}
.cmacal-days{display:flex;flex-wrap:wrap;gap:.5rem;margin-bottom:.75rem}
.cmacal-day{display:flex;flex-direction:column;align-items:center;padding:.5rem .75rem;border:1px solid #ccc;background:#fff;border-radius:4px}
.cmacal-day[aria-pressed="true"]{border-color:#1d4ed8;background:#eef4ff}
.cmacal-day small{font-size:.75em;color:#555}
.cmacal-slots{display:grid;grid-template-columns:repeat(auto-fill,minmax(10rem,1fr));gap:.5rem;margin-bottom:.75rem}
.cmacal-slots-title{grid-column:1/-1;margin:0;font-weight:600}
.cmacal-slot{border:1px solid #ddd;padding:.5rem;border-radius:4px;margin:0}
.cmacal-slot.is-disabled{opacity:.5}
.cmacal-js .cmacal-slots{display:none}
.cmacal-js .cmacal-slots.is-active{display:grid}
.cmacal-insurance{margin-top:.75rem}
/* 0.5.0 month tabs (one month at a time with JS; all months with headings without JS) */
.cmacal-months{display:flex;flex-wrap:wrap;gap:.5rem;margin:0 0 .75rem}
.cmacal-month-tab{display:inline-flex;align-items:center;justify-content:center;min-height:44px;min-width:44px;padding:.4rem 1rem;border:1px solid #ccc;border-radius:4px;background:#fff;color:inherit;text-decoration:none;font-weight:600;line-height:1.2}
.cmacal-month-tab:hover,.cmacal-month-tab:focus-visible{border-color:#1d4ed8}
.cmacal-month-tab[aria-selected="true"]{border-color:#1d4ed8;background:#eef4ff;color:#1d4ed8}
.cmacal-month{margin:0 0 1rem;scroll-margin-top:6rem}
.cmacal .cmacal-month-title{font-size:17px!important;line-height:1.3;font-weight:700;margin:.25rem 0 .5rem;text-transform:none;letter-spacing:0}
.cmacal-tabs-js .cmacal-month{display:none}
.cmacal-tabs-js .cmacal-month.is-active{display:block}
.cmacal-day{min-height:44px}
/* 0.5.0 "calendar always on top": the site's fixed Google Reviews bar (#cma-tick, position:fixed; bottom:0; z-index:9990; 44px)
   must never cover the calendar, and when the product columns stack (Bricks container is a column below 992px)
   the calendar column comes first instead of under the reviews/description column. */
.cmacal{position:relative;z-index:9991;background:#fff;scroll-margin-bottom:64px}
body:has(#cma-tick) form.cart:has(.cmacal){padding-bottom:56px}
body:has(.brx-open,.show-mobile-menu) .cmacal{z-index:auto}
/* Stacked (<992px, the Bricks container switches to a column): 1) Need to Know, 2) calendar + Add to cart, 3) reviews.
   The left column is unwrapped (display:contents) so its children can be ordered around the calendar column. */
@media (max-width:991px){
 .brxe-container:has(> * .cmacal) > :not(:has(.cmacal)){display:contents!important}
 .brxe-container:has(> * .cmacal) > :not(:has(.cmacal)) > *{order:0!important}
 .brxe-container:has(> * .cmacal) > :has(.cmacal){order:1!important}
 .brxe-container:has(> * .cmacal) > :not(:has(.cmacal)) > :has(.ti-widget,[class*="ti-"],[id*="rev"]){order:2!important}
}
/* 0.5.1 booking form extras */
.cmacal-participants{margin:1em 0 .5em}.cmacal-participants>label{display:block;font-weight:600;margin-bottom:.35em}
.cmacal-stepper{display:inline-flex;align-items:stretch;border:1px solid #bbb;border-radius:6px;overflow:hidden}
.cmacal-stepper .cmacal-step{width:44px;min-width:44px;min-height:44px;display:flex;align-items:center;justify-content:center;text-align:center;font-size:1.3em;line-height:1;background:#f3f3f3;color:#222;border:0;cursor:pointer;padding:0!important;margin:0}
.cmacal-stepper .cmacal-step:disabled{opacity:.4;cursor:default}
.cmacal-stepper input{width:3.2em;text-align:center;border:0;border-left:1px solid #bbb;border-right:1px solid #bbb;font-size:1.1em;-moz-appearance:textfield;margin:0}
.cmacal-stepper input::-webkit-outer-spin-button,.cmacal-stepper input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}
.cmacal-p-note{display:block;margin-top:.3em;color:#555}
.cmacal-live-msg{display:block;margin:.4em 0;color:#a00;font-weight:600}
.cmacal-live-msg[hidden]{display:none}
.cmacal-ack{margin:.6em 0}.cmacal-ack label{display:block;padding-left:28px;text-indent:-28px;cursor:pointer}.cmacal-ack input{vertical-align:-3px;margin:0 8px 0 0;width:18px;height:18px;text-indent:0}
.cmacal-ack .required{color:#b00;text-decoration:none;border:0}
.cmacal-comments label{display:block;font-weight:600;margin-bottom:.35em}.cmacal-comments textarea{width:100%;box-sizing:border-box;min-height:4.5em}
/* 0.5.3 booking box header — mirrors the live "Class Cost" callout and title line (same values as the site's styles) */
.cmacal .cmacal-cost{box-sizing:border-box;display:flex!important;align-items:baseline;flex-wrap:wrap;gap:.55rem .7rem;width:100%;margin:0 0 16px;padding:16px 20px;background:#242424;border:3px solid #f0a332;border-radius:5px;color:#fff;line-height:1.15;box-shadow:0 3px 12px rgba(0,0,0,.16)}
.cmacal .cmacal-cost>span{font-size:24px;font-weight:700;letter-spacing:.01em;color:#fff}
.cmacal .cmacal-cost>strong{color:#f0a332;font-size:36px;font-weight:800;white-space:nowrap}
.cmacal .cmacal-cost>strong .woocommerce-Price-amount{color:inherit}
@media (max-width:767px){.cmacal .cmacal-cost{padding:14px 16px}.cmacal .cmacal-cost>span{font-size:20px}.cmacal .cmacal-cost>strong{font-size:28px}}

/* 1.0.1: old look by default. No Woo quantity box on calendar products; booking button only once a date is picked (none when no dates). */
form.cart:has(fieldset.cmacal) .quantity { display: none !important; }
form.cart:has(fieldset.cmacal[data-btn="hide"]):not(:has(input[name="cmacal_session"]:checked)) .single_add_to_cart_button,
form.cart.cmacal-hidebtn.cmacal-nodate .single_add_to_cart_button,
form.cart.cmacal-hidebtn.cmacal-nodates .single_add_to_cart_button { display: none !important; }
/* 1.0.2: disabled before a date is picked, exactly as PluginHive's "Enroll Now" (class "disabled", same orange, full opacity: measured on the PluginHive page). */
form.cart .single_add_to_cart_button.cmacal-disabled { opacity: 1 !important; cursor: not-allowed; }
/* PluginHive's dark "Please Pick a Class Date" bar (same colours / size as the old booking-info box). */
.cmacal .cmacal-info { background: #242424; color: #f0a332; padding: 10px 10px 14.5px; margin: 11px 0 0; font-size: 15px; line-height: 25.5px; border: 0; border-radius: 0; }
.cmacal .cmacal-info p { margin: 0; padding: 0; color: #f0a332; text-align: center; font-size: 15px; line-height: 25.5px; }
.cmacal .cmacal-info.is-picked { padding-bottom: 9px; }
.cmacal .cmacal-info.is-picked p { text-align: left; }
.cmacal .cmacal-info .cmacal-info-price:empty { display: none; }
.cmacal .cmacal-info strong { font-weight: 700; color: #f0a332; }

/* 1.0.6: no date picked after ?add-to-cart= → the bar pulses (same colours, no new box) */
@keyframes cmacal-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(240, 163, 50, 0); } 50% { box-shadow: 0 0 0 4px rgba(240, 163, 50, .9); } }
.cmacal .cmacal-info.cmacal-pulse { animation: cmacal-pulse .8s ease-in-out 4; }

/* 1.0.8: long date lists scroll inside their own box on every calendar product (max height = setting, or lined up with
   Need to Know by date-list.js). Same look: only the list gets a height limit, a sticky header and a thin visible scrollbar. */
.cmacal.cmacal-scroll .cmacal-table,
.cmacal.cmacal-scroll .cmacal-days,
.cmacal.cmacal-scroll .cmacal-slots { max-height: var(--cmacal-list-max, 340px); overflow-y: auto; overscroll-behavior: contain; position: relative; scrollbar-width: thin; scrollbar-color: #b5b5b5 #f1f1f1; }
.cmacal.cmacal-scroll .cmacal-table > .cmacal-row { flex-shrink: 0; }
.cmacal.cmacal-scroll .cmacal-head { position: sticky; top: 0; z-index: 2; box-shadow: 0 1px 0 #e3e3e3; }
.cmacal.cmacal-scroll .cmacal-slots > .cmacal-slots-title { position: sticky; top: 0; z-index: 2; background: #fff; padding: .25rem 0; }
.cmacal.cmacal-scroll .cmacal-table::-webkit-scrollbar,
.cmacal.cmacal-scroll .cmacal-days::-webkit-scrollbar,
.cmacal.cmacal-scroll .cmacal-slots::-webkit-scrollbar { width: 8px; }
.cmacal.cmacal-scroll .cmacal-table::-webkit-scrollbar-track,
.cmacal.cmacal-scroll .cmacal-days::-webkit-scrollbar-track,
.cmacal.cmacal-scroll .cmacal-slots::-webkit-scrollbar-track { background: #f1f1f1; }
.cmacal.cmacal-scroll .cmacal-table::-webkit-scrollbar-thumb,
.cmacal.cmacal-scroll .cmacal-days::-webkit-scrollbar-thumb,
.cmacal.cmacal-scroll .cmacal-slots::-webkit-scrollbar-thumb { background: #b5b5b5; border-radius: 4px; }
