/* Mahamukti Course Booking — public widget styles
   All colors/shape driven by CSS custom properties set inline per instance,
   falling back to sensible defaults here. */

.mcb-widget {
	--mcb-primary: #0f7a5c;
	--mcb-secondary: #f5f5f0;
	--mcb-radius: 8px;
	--mcb-font: inherit;
	font-family: var(--mcb-font);
	max-width: 780px;
	margin: 0 auto;
	box-sizing: border-box;
	color: #222;
	position: relative;
	z-index: 1;
	/* Prevents clicks on cards/calendar/buttons from being misread as a
	   text-selection drag when the widget sits inside a sticky/fixed
	   container that shifts slightly during scroll — without this, a click
	   with even a hair of mouse movement can select text instead of firing,
	   which is exactly what breaks interaction inside sticky sidebars. */
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
}
.mcb-widget * { box-sizing: border-box; }
/* Form fields and free text (descriptions, summary, messages) should still
   be selectable/editable normally. */
.mcb-widget input,
.mcb-widget textarea,
.mcb-widget select,
.mcb-widget .mcb-room-row-subtitle,
.mcb-widget .mcb-card-meta,
.mcb-widget .mcb-card-room-prices,
.mcb-widget .mcb-summary {
	-webkit-user-select: text;
	-moz-user-select: text;
	-ms-user-select: text;
	user-select: text;
}

.mcb-alert {
	padding: 12px 16px;
	border-radius: var(--mcb-radius);
	margin-bottom: 16px;
	font-size: 14px;
}
.mcb-alert-error { background: #fdeaea; color: #a12727; border: 1px solid #f3b8b8; }
.mcb-alert-success { background: #e9f7ef; color: #146c43; border: 1px solid #b7e4c7; }

/* ---------- Progress bar ---------- */
.mcb-progress {
	display: flex;
	justify-content: space-between;
	margin-bottom: 24px;
	gap: 4px;
}
.mcb-progress-step {
	flex: 1;
	text-align: center;
	opacity: 0.45;
	font-size: 13px;
}
.mcb-progress-step.is-active,
.mcb-progress-step.is-complete { opacity: 1; }
.mcb-progress-dot {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: var(--mcb-secondary);
	color: var(--mcb-primary);
	font-weight: 600;
	margin-bottom: 4px;
	border: 2px solid var(--mcb-primary);
}
.mcb-progress-step.is-complete .mcb-progress-dot {
	background: var(--mcb-primary);
	color: #fff;
}
.mcb-progress-label { display: block; }

/* ---------- Steps ---------- */
.mcb-step-title { margin: 0 0 16px; font-size: 18px; }
.mcb-step { margin-bottom: 12px; }
.mcb-loading { opacity: 0.7; font-style: italic; }

.mcb-step-actions {
	display: flex;
	justify-content: space-between;
	margin-top: 20px;
	gap: 12px;
}

.mcb-btn {
	border: none;
	padding: 12px 22px;
	border-radius: var(--mcb-radius);
	font-size: 15px;
	cursor: pointer;
	font-family: inherit;
	transition: opacity .15s ease, transform .1s ease;
}
.mcb-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.mcb-btn-primary { background: var(--mcb-primary); color: #fff; margin-left: auto; }
.mcb-btn-primary:hover:not(:disabled) { opacity: 0.9; }
.mcb-btn-ghost { background: transparent; color: var(--mcb-primary); border: 1px solid var(--mcb-primary); }

/* ---------- Step 1: Course cards ---------- */
.mcb-course-list { display: grid; gap: 14px; }
.mcb-layout-grid .mcb-course-list { grid-template-columns: repeat(2, 1fr); }
.mcb-layout-list .mcb-course-list { grid-template-columns: 1fr; }

/* ---------- Price teaser (Step 2 header) ---------- */
.mcb-price-teaser {
	margin-bottom: 14px;
}
.mcb-price-teaser-duration {
	font-size: 14px;
	color: #444;
	margin-bottom: 2px;
}
.mcb-price-teaser-price {
	font-size: 22px;
	font-weight: 700;
	color: #111;
}

/* ---------- Step 2: Calendar ---------- */
.mcb-calendar { border: 1px solid #e4e4e0; border-radius: var(--mcb-radius); padding: 14px; }
.mcb-calendar-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.mcb-cal-month-label { font-weight: 600; }
.mcb-cal-nav {
	background: var(--mcb-secondary) !important;
	border: none !important;
	width: 32px; height: 32px;
	border-radius: 50%;
	cursor: pointer;
	font-size: 18px !important;
	line-height: 1 !important;
	color: var(--mcb-primary) !important;
	text-align: center;
	padding: 0 !important;
	font-family: Arial, sans-serif !important; /* the ‹ › glyphs render reliably here even if the theme forces a custom icon/decorative font on all buttons */
}
.mcb-cal-weekdays, .mcb-cal-grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 4px;
	text-align: center;
}
.mcb-cal-weekdays span { font-size: 12px; color: #888; padding: 4px 0; }
.mcb-cal-day {
	position: relative;
	padding: 10px 0;
	border-radius: 6px;
	font-size: 13px;
	background: transparent;
	border: 1px solid transparent;
	cursor: default;
	color: #ccc;
}
.mcb-cal-day.is-outside { color: #d5d5d0; }
.mcb-cal-day.is-empty { visibility: hidden; }

/* Any day that has batch data gets a light fill, matching the reference design
   (not just a border) — status-specific tint, selectable ones get the accent tint. */
.mcb-cal-day.is-selectable {
	color: #1a4d3a;
	cursor: pointer;
	background: color-mix(in srgb, var(--mcb-primary) 12%, #fff);
	font-weight: 600;
}
.mcb-cal-day.is-selectable:hover { background: color-mix(in srgb, var(--mcb-primary) 22%, #fff); }
.mcb-cal-day.status-filling_fast.is-selectable { background: #fff4dd; color: #916a00; }
.mcb-cal-day.status-full {
	color: #c33;
	background: #fdeaea;
	text-decoration: line-through;
	cursor: not-allowed;
}
.mcb-cal-bolt {
	position: absolute;
	top: 1px;
	right: 3px;
	font-size: 8px;
	line-height: 1;
}
.mcb-cal-day.is-selected {
	background: var(--mcb-primary) !important;
	color: #fff !important;
}

.mcb-selected-date-info { margin-top: 14px; padding: 12px; background: var(--mcb-secondary); border-radius: var(--mcb-radius); }
.mcb-date-row { font-size: 14px; margin-bottom: 4px; }
.mcb-badge {
	display: inline-block;
	padding: 3px 10px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 600;
	background: #e9f7ef;
	color: #146c43;
}
.mcb-badge.status-filling_fast { background: #fff4dd; color: #916a00; }
.mcb-badge.status-full { background: #fdeaea; color: #a12727; }

/* ---------- Step 3: Room cards (grid layout) ---------- */
.mcb-room-list { display: grid; gap: 14px; }
.mcb-layout-grid .mcb-room-list { grid-template-columns: repeat(2, 1fr); }
.mcb-layout-list .mcb-room-list { grid-template-columns: 1fr; gap: 0; }

.mcb-course-card, .mcb-room-card {
	border: 2px solid #e4e4e0;
	border-radius: var(--mcb-radius);
	padding: 14px;
	cursor: pointer;
	background: #fff;
	transition: border-color .15s ease, box-shadow .15s ease;
	display: flex;
	flex-direction: column;
	gap: 6px;
}
.mcb-course-card:hover, .mcb-room-card:hover { border-color: var(--mcb-primary); }
.mcb-course-card.is-selected, .mcb-room-card.is-selected {
	border-color: var(--mcb-primary);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--mcb-primary) 20%, transparent);
	background: var(--mcb-secondary);
}
.mcb-card-img {
	width: 100%;
	height: 130px;
	object-fit: cover;
	border-radius: calc(var(--mcb-radius) - 2px);
}
.mcb-card-title { font-weight: 600; font-size: 15px; }
.mcb-card-meta { font-size: 13px; color: #666; }
.mcb-card-price { font-weight: 700; color: var(--mcb-primary); font-size: 16px; }

/* ---------- Highlighted price + dates (Step 1 course card) ----------
   Deliberately louder than the rest of the card: this is the price and
   the dates — the two things that decide whether someone books. */
.mcb-card-price-highlight {
	display: inline-flex;
	align-items: baseline;
	gap: 6px;
	margin-top: 6px;
	padding: 6px 12px;
	border-radius: 999px;
	background: color-mix(in srgb, var(--mcb-primary) 14%, #fff);
	border: 1px solid color-mix(in srgb, var(--mcb-primary) 35%, #fff);
	width: fit-content;
}
.mcb-card-price-highlight-label {
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: .04em;
	color: color-mix(in srgb, var(--mcb-primary) 70%, #000);
	font-weight: 700;
}
.mcb-card-price-highlight-value {
	font-size: 18px;
	font-weight: 800;
	color: color-mix(in srgb, var(--mcb-primary) 85%, #000);
}
.mcb-card-dates { margin-top: 10px; }
.mcb-card-dates-label {
	display: block;
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: .04em;
	color: #888;
	font-weight: 700;
	margin-bottom: 5px;
}
.mcb-card-dates-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.mcb-date-pill {
	display: inline-block;
	padding: 4px 10px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 700;
	background: #fff4dd;
	color: #916a00;
	border: 1px solid #f2dca6;
}
.mcb-date-pill.status-open {
	background: color-mix(in srgb, var(--mcb-primary) 16%, #fff);
	color: color-mix(in srgb, var(--mcb-primary) 80%, #000);
	border-color: color-mix(in srgb, var(--mcb-primary) 40%, #fff);
}

.mcb-card-room-prices {
	list-style: none;
	margin: 8px 0 0;
	padding: 8px 0 0;
	border-top: 1px dashed #e4e4e0;
	display: flex;
	flex-direction: column;
	gap: 4px;
}
.mcb-card-room-prices li {
	display: flex;
	justify-content: space-between;
	gap: 10px;
	font-size: 12.5px;
	color: #555;
}
.mcb-card-room-name { flex: 1; min-width: 0; }
.mcb-card-room-price { font-weight: 600; color: #333; white-space: nowrap; }

/* ---------- Step 3: Room rows (vertical-list layout, one row per occupancy) ---------- */
.mcb-room-row {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	padding: 18px 4px;
	border-bottom: 1px solid #eee;
	cursor: pointer;
	border-radius: 8px;
	transition: background-color .15s ease;
}
.mcb-room-row:hover { background: color-mix(in srgb, var(--mcb-primary) 6%, transparent); }
.mcb-room-row.is-selected {
	background: color-mix(in srgb, var(--mcb-primary) 10%, transparent);
}
.mcb-room-row-left { flex: 1; min-width: 0; }
.mcb-room-row-people { font-size: 13px; color: #666; margin-bottom: 4px; }
.mcb-room-row-title-line {
	display: flex;
	align-items: center;
	gap: 10px;
	cursor: pointer;
	font-weight: 600;
	font-size: 15px;
	margin-bottom: 2px;
}
.mcb-room-row-radio { width: 18px; height: 18px; accent-color: var(--mcb-primary); flex-shrink: 0; }
.mcb-room-row-subtitle { font-size: 13px; color: #777; margin: 2px 0 10px 28px; }
.mcb-room-row-buttons { display: flex; gap: 10px; margin-left: 28px; flex-wrap: wrap; }
.mcb-btn-outline-sm {
	background: #fff;
	border: 1px solid #d8d8d3;
	color: #333;
	padding: 8px 14px;
	border-radius: calc(var(--mcb-radius) / 1.5);
	font-size: 13px;
	cursor: pointer;
	font-family: inherit;
}
.mcb-btn-outline-sm:hover { border-color: var(--mcb-primary); color: var(--mcb-primary); }
.mcb-room-row-right { text-align: right; flex-shrink: 0; white-space: nowrap; }
.mcb-room-row-price { font-weight: 700; font-size: 16px; color: #111; }
.mcb-room-row-price-label { font-size: 12px; color: #888; }

.mcb-participants-row { display: flex; align-items: center; gap: 14px; margin-top: 16px; }
.mcb-stepper { display: flex; align-items: center; gap: 8px; }
.mcb-stepper-btn {
	width: 32px; height: 32px;
	border-radius: 50%;
	border: 1px solid var(--mcb-primary);
	background: #fff;
	color: var(--mcb-primary);
	font-size: 18px;
	cursor: pointer;
}
.mcb-stepper input {
	width: 46px;
	text-align: center;
	border: 1px solid #e4e4e0;
	border-radius: 6px;
	padding: 6px 0;
}

/* ---------- Step 4: Summary + form ---------- */
.mcb-summary {
	background: var(--mcb-secondary);
	border-radius: var(--mcb-radius);
	padding: 16px;
	margin-bottom: 20px;
}
.mcb-summary-row { display: flex; justify-content: space-between; font-size: 14px; padding: 4px 0; }
.mcb-summary-row.mcb-summary-total { font-weight: 700; font-size: 16px; border-top: 1px solid rgba(0,0,0,.1); margin-top: 8px; padding-top: 10px; color: var(--mcb-primary); }

.mcb-details-form label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 12px; }
.mcb-details-form input,
.mcb-details-form select,
.mcb-details-form textarea {
	display: block;
	width: 100%;
	margin-top: 5px;
	padding: 10px 12px;
	border: 1px solid #d8d8d3;
	border-radius: calc(var(--mcb-radius) / 1.5);
	font-size: 14px;
	font-family: inherit;
	font-weight: 400;
}
.mcb-form-row-half { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.mcb-phone-group { display: grid; grid-template-columns: 130px 1fr; gap: 8px; }
.mcb-req { color: #c33; }
.mcb-field-error { display: block; color: #a12727; font-size: 12px; font-weight: 400; margin-top: 4px; min-height: 14px; }

/* ---------- Thank you ---------- */
.mcb-thankyou { text-align: center; padding: 20px 10px; }
.mcb-thankyou-icon {
	width: 56px; height: 56px;
	line-height: 56px;
	border-radius: 50%;
	background: var(--mcb-primary);
	color: #fff;
	font-size: 26px;
	margin: 0 auto 14px;
}

/* ---------- Photo lightbox ---------- */
.mcb-lightbox {
	position: fixed;
	top: 0; left: 0; right: 0; bottom: 0;
	background: rgba(0,0,0,.85);
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
}
.mcb-lightbox[hidden] { display: none !important; }
.mcb-lightbox-img { max-width: 90vw; max-height: 85vh; border-radius: 6px; }
.mcb-lightbox-close, .mcb-lightbox-nav {
	position: fixed;
	background: rgba(255,255,255,.15);
	color: #fff;
	border: none;
	cursor: pointer;
	border-radius: 50%;
}
.mcb-lightbox-close { top: 20px; right: 20px; width: 40px; height: 40px; font-size: 22px; }
.mcb-lightbox-nav { top: 50%; transform: translateY(-50%); width: 46px; height: 46px; font-size: 24px; }
.mcb-lightbox-prev { left: 16px; }
.mcb-lightbox-next { right: 16px; }
.mcb-lightbox-close:hover, .mcb-lightbox-nav:hover { background: rgba(255,255,255,.3); }

/* ---------- No-JS fallback ---------- */
.mcb-noscript-fallback { border: 1px solid #e4e4e0; border-radius: var(--mcb-radius); padding: 16px; }
.mcb-fallback-form label { display: block; margin-bottom: 12px; font-size: 13px; font-weight: 600; }
.mcb-fallback-form input, .mcb-fallback-form select, .mcb-fallback-form textarea {
	display: block; width: 100%; margin-top: 5px; padding: 10px; border: 1px solid #d8d8d3; border-radius: 6px; font-weight: 400;
}
.mcb-fallback-form button {
	background: var(--mcb-primary); color: #fff; border: none; padding: 12px 22px; border-radius: var(--mcb-radius); cursor: pointer;
}
/* When JS is running, .mcb-app is shown and noscript is naturally not rendered by the browser anyway.
   This class exists so we can hide-by-default a broken half-loaded state before JS boots. */
.mcb-app[data-no-js-hide] { }

/* ---------- Mobile-first responsive ---------- */
@media (max-width: 640px) {
	.mcb-layout-grid .mcb-course-list,
	.mcb-layout-grid .mcb-room-list {
		grid-template-columns: 1fr;
	}
	.mcb-form-row-half { grid-template-columns: 1fr; }
	.mcb-phone-group { grid-template-columns: 100px 1fr; }
	.mcb-progress-label { font-size: 10px; }
	.mcb-calendar { overflow-x: auto; }
	.mcb-step-title { font-size: 16px; }
	.mcb-card-img { height: 100px; }
	.mcb-room-row { flex-direction: column; gap: 8px; }
	.mcb-room-row-right { text-align: left; }
	.mcb-lightbox-nav { width: 38px; height: 38px; font-size: 20px; }
	.mcb-lightbox-close { width: 34px; height: 34px; font-size: 18px; top: 12px; right: 12px; }
}

/* ---------- Sticky "Book Now" CTA ----------
   Appended once to <body> (outside any .mcb-widget), so it isn't affected by a
   particular widget instance's theme scope; the button's background color is
   still set inline from the Settings primary color. */
.mcb-sticky-cta {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 99999;
	display: flex;
	flex-direction: column;
	gap: 10px;
	justify-content: center;
	padding: 14px 16px calc(14px + env(safe-area-inset-bottom, 0px));
	pointer-events: none;
	transform: translateY(120%);
	opacity: 0;
	transition: transform .25s ease, opacity .25s ease;
	background: linear-gradient(to top, rgba(255,255,255,.97) 60%, rgba(255,255,255,0));
}
.mcb-sticky-cta.is-visible {
	transform: translateY(0);
	opacity: 1;
}
.mcb-sticky-cta-btn {
	pointer-events: all;
	border: none;
	padding: 15px 30px;
	border-radius: 999px;
	font-size: 15px;
	font-weight: 700;
	font-family: inherit;
	cursor: pointer;
	width: 100%;
	max-width: 480px;
	margin: 0 auto;
}
.mcb-sticky-cta-btn-solid {
	background: #0f7a5c;
	color: #fff;
	box-shadow: 0 8px 24px rgba(0,0,0,.22);
}
.mcb-sticky-cta-btn-solid:hover { opacity: 0.92; }
.mcb-sticky-cta-btn-outline {
	background: #fff;
	color: #0f7a5c;
	border: 2px solid #0f7a5c;
}
.mcb-sticky-cta-btn-outline:hover { background: color-mix(in srgb, currentColor 8%, #fff); }

/* On tablet/desktop/laptop widths, dock it as a compact floating stack in the
   bottom-right corner instead of a full-width mobile bar. */
@media (min-width: 641px) {
	.mcb-sticky-cta {
		flex-direction: row;
		align-items: center;
		justify-content: flex-end;
		padding: 0 32px 32px 0;
		background: none;
	}
	.mcb-sticky-cta-btn {
		width: auto;
		padding: 16px 30px;
		margin: 0;
	}
}
