/* TWS Booking Calendar widget - Calendly-style layout.
   Theme per site by overriding these custom properties on .twsbc-root. */
.twsbc-root {
	--twsbc-accent: #3d216e;
	--twsbc-accent-soft: rgba(61, 33, 110, 0.08);
	--twsbc-accent-softer: rgba(61, 33, 110, 0.14);
	--twsbc-accent-text: #ffffff;
	--twsbc-text: #1a1a1a;
	--twsbc-muted: rgba(26, 26, 26, 0.61);
	--twsbc-bg: #ffffff;
	--twsbc-border: #e7e7e7;
	--twsbc-error: #b91c1c;
	--twsbc-radius: 8px;

	color: var(--twsbc-text);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 15px;
	line-height: 1.5;
	box-sizing: border-box;
}

.twsbc-root *,
.twsbc-root *::before,
.twsbc-root *::after { box-sizing: inherit; }

/* Trigger */
.twsbc-trigger-button {
	background: #3d216e;
	color: #fff;
	border: 0;
	border-radius: 40px;
	padding: 12px 24px;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
}
.twsbc-trigger-button:hover { filter: brightness(1.15); }

/* Modal shell */
.twsbc-overlay {
	position: fixed;
	inset: 0;
	background: rgba(20, 20, 30, 0.6);
	z-index: 999999;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding: 40px 16px;
	overflow-y: auto;
}
.twsbc-noscroll { overflow: hidden; }

.twsbc-modal {
	position: relative;
	background: var(--twsbc-bg);
	border-radius: var(--twsbc-radius);
	width: 100%;
	max-width: 980px;
	min-height: 480px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.twsbc-inline-root {
	background: var(--twsbc-bg);
	border: 1px solid var(--twsbc-border);
	border-radius: var(--twsbc-radius);
	max-width: 980px;
	box-shadow: 0 1px 8px rgba(0, 0, 0, 0.06);
}

.twsbc-close {
	position: absolute;
	top: 10px;
	right: 12px;
	background: none;
	border: 0;
	font-size: 28px;
	line-height: 1;
	color: var(--twsbc-muted);
	cursor: pointer;
	padding: 4px 8px;
	z-index: 2;
}
.twsbc-close:hover { color: var(--twsbc-text); }

/* Panel fade between steps */
.twsbc-panel { animation: twsbc-fade 0.18s ease-out; }
@keyframes twsbc-fade { from { opacity: 0.4; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
	.twsbc-panel { animation: none; }
}

/* Two-panel layout */
.twsbc-layout { display: flex; min-height: 480px; }

.twsbc-side {
	width: 300px;
	flex-shrink: 0;
	border-right: 1px solid var(--twsbc-border);
	padding: 26px 28px;
}

.twsbc-back {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: 1px solid var(--twsbc-border);
	background: none;
	color: var(--twsbc-accent);
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 14px;
}
.twsbc-back:hover { background: var(--twsbc-accent-soft); }

.twsbc-side-logo { max-height: 56px; max-width: 200px; height: auto; display: block; margin-bottom: 12px; }
.twsbc-side-title { font-size: 24px; font-weight: 700; margin: 4px 0 16px; line-height: 1.25; }

.twsbc-badge {
	display: inline-block;
	background: var(--twsbc-accent-soft);
	color: var(--twsbc-accent);
	font-size: 12px;
	font-weight: 700;
	border-radius: 20px;
	padding: 3px 12px;
	margin-bottom: 12px;
}

.twsbc-meta {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	color: var(--twsbc-muted);
	font-weight: 600;
	font-size: 14px;
	margin: 10px 0;
}
.twsbc-meta-strong { color: var(--twsbc-text); }
.twsbc-ic { flex-shrink: 0; display: inline-flex; margin-top: 1px; }

.twsbc-side-price {
	margin-top: 14px;
	padding-top: 12px;
	border-top: 1px solid var(--twsbc-border);
	font-weight: 700;
	font-size: 14px;
}

/* Main area */
.twsbc-main { flex: 1; padding: 26px 30px 30px; min-width: 0; }
.twsbc-h2 { font-size: 20px; font-weight: 700; margin: 0 0 18px; }

.twsbc-calwrap { display: flex; gap: 28px; }
.twsbc-calendar { flex: 1; max-width: 420px; min-width: 0; }

/* Month bar */
.twsbc-monthbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 10px;
}
.twsbc-monthlabel { font-weight: 700; font-size: 16px; }
.twsbc-monthnav { display: inline-flex; gap: 4px; }
.twsbc-nav {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	border: 0;
	background: none;
	color: var(--twsbc-accent);
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}
.twsbc-nav:hover:not(:disabled) { background: var(--twsbc-accent-soft); }
.twsbc-nav:disabled { color: #c9c9c9; cursor: default; }

/* Calendar grid */
.twsbc-grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 4px;
	justify-items: center;
}
.twsbc-dow {
	color: var(--twsbc-muted);
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.4px;
	padding: 6px 0;
}
.twsbc-blank { width: 42px; height: 42px; }

.twsbc-day {
	position: relative;
	width: 42px;
	height: 42px;
	border-radius: 50%;
	border: 0;
	background: none;
	color: #c4c4c4;
	font-size: 14px;
	font-weight: 600;
	cursor: default;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}
.twsbc-day-open {
	background: var(--twsbc-accent-soft);
	color: var(--twsbc-accent);
	font-weight: 700;
	cursor: pointer;
}
.twsbc-day-open:hover { background: var(--twsbc-accent-softer); }
.twsbc-day-selected,
.twsbc-day-open.twsbc-day-selected {
	background: var(--twsbc-accent);
	color: var(--twsbc-accent-text);
}
.twsbc-day-inrange,
.twsbc-day-open.twsbc-day-inrange,
.twsbc-day-hover,
.twsbc-day-open.twsbc-day-hover { background: var(--twsbc-accent-softer); color: var(--twsbc-accent); }
.twsbc-day-endable { box-shadow: inset 0 0 0 1px var(--twsbc-accent); }
.twsbc-day-today::after {
	content: "";
	position: absolute;
	bottom: 5px;
	left: 50%;
	transform: translateX(-50%);
	width: 4px;
	height: 4px;
	border-radius: 50%;
	background: currentColor;
}

/* Times column */
.twsbc-times {
	width: 230px;
	flex-shrink: 0;
	max-height: 420px;
	overflow-y: auto;
	padding-right: 4px;
}
.twsbc-times-title { font-size: 15px; font-weight: 700; margin: 2px 0 12px; }
.twsbc-times-sub { color: var(--twsbc-muted); font-size: 14px; font-weight: 600; margin: 4px 0; }
.twsbc-times-until { color: var(--twsbc-text); margin-top: 10px; }
.twsbc-times-price { font-size: 20px; font-weight: 700; margin: 10px 0 2px; }

.twsbc-time {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	border: 1px solid rgba(61, 33, 110, 0.55);
	background: var(--twsbc-bg);
	border-radius: 6px;
	padding: 13px 8px;
	margin-bottom: 10px;
	font-size: 15px;
	font-weight: 700;
	color: var(--twsbc-accent);
	cursor: pointer;
}
.twsbc-time:hover { border-color: var(--twsbc-accent); box-shadow: inset 0 0 0 1px var(--twsbc-accent); }
.twsbc-time small { color: var(--twsbc-muted); font-weight: 600; }

/* The Calendly time/confirm split */
.twsbc-split { display: flex; gap: 8px; margin-bottom: 10px; }
.twsbc-split-time {
	flex: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: #666666;
	color: #fff;
	font-weight: 700;
	border-radius: 6px;
	padding: 13px 6px;
	font-size: 14px;
}
.twsbc-split-confirm {
	flex: 1;
	border: 0;
	background: var(--twsbc-accent);
	color: var(--twsbc-accent-text);
	font-weight: 700;
	font-size: 15px;
	border-radius: 6px;
	padding: 13px 6px;
	cursor: pointer;
}
.twsbc-split-confirm:hover { filter: brightness(1.15); }

.twsbc-changelink {
	background: none;
	border: 0;
	color: var(--twsbc-accent);
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	padding: 4px 0;
	text-decoration: underline;
}

/* Form */
.twsbc-form { max-width: 460px; }
.twsbc-field { margin-bottom: 14px; }
.twsbc-field label {
	display: block;
	font-size: 14px;
	font-weight: 700;
	margin-bottom: 6px;
}
.twsbc-field input,
.twsbc-field textarea,
.twsbc-field select {
	width: 100%;
	border: 1px solid #a6a6a6;
	border-radius: 8px;
	padding: 11px 12px;
	font-size: 15px;
	background: var(--twsbc-bg);
	color: var(--twsbc-text);
	font-family: inherit;
}
.twsbc-field textarea { min-height: 80px; resize: vertical; }
.twsbc-field input:focus,
.twsbc-field textarea:focus,
.twsbc-field select:focus {
	outline: 2px solid var(--twsbc-accent);
	outline-offset: 0;
	border-color: var(--twsbc-accent);
}
.twsbc-option { display: block; font-weight: 400 !important; font-size: 14px !important; margin: 4px 0; }

/* Own-drawn ticks: the host theme strips native checkbox/radio chrome
   with a global appearance:none, so these are fully painted by us. */
.twsbc-tickrow {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	cursor: pointer;
	font-weight: 400 !important;
	font-size: 14px !important;
	line-height: 1.5;
	margin: 6px 0;
}
.twsbc-tickrow span { flex: 1; }
.twsbc-field input.twsbc-tick {
	-webkit-appearance: none;
	appearance: none;
	width: 20px;
	height: 20px;
	min-width: 20px;
	border: 2px solid #c6c6d2;
	border-radius: 6px;
	background: #fff;
	cursor: pointer;
	display: inline-block;
	flex: 0 0 auto;
	margin: 1px 0 0;
	padding: 0;
	position: relative;
}
.twsbc-field input.twsbc-tick:checked {
	background: var(--twsbc-accent);
	border-color: var(--twsbc-accent);
}
.twsbc-field input.twsbc-tick:checked::after {
	content: "";
	position: absolute;
	left: 5px;
	top: 1px;
	width: 5px;
	height: 10px;
	border: solid #fff;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}
.twsbc-field input.twsbc-tick-radio { border-radius: 50%; }
.twsbc-field input.twsbc-tick-radio:checked::after {
	border: 0;
	border-radius: 50%;
	background: #fff;
	left: 4px;
	top: 4px;
	width: 8px;
	height: 8px;
	transform: none;
}
.twsbc-field input.twsbc-tick:focus-visible {
	outline: 2px solid var(--twsbc-accent);
	outline-offset: 2px;
}
.twsbc-field-error {
	display: block;
	color: var(--twsbc-error);
	font-size: 12px;
	min-height: 14px;
}
.twsbc-trap {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}
.twsbc-form-price { font-weight: 700; margin: 12px 0 0; }

/* Buttons */
.twsbc-btn {
	display: inline-block;
	border: 1px solid transparent;
	border-radius: 40px;
	padding: 12px 26px;
	font-size: 15px;
	font-weight: 700;
	cursor: pointer;
	text-decoration: none;
	text-align: center;
	font-family: inherit;
}
.twsbc-btn-primary {
	background: var(--twsbc-accent);
	border-color: var(--twsbc-accent);
	color: var(--twsbc-accent-text);
}
.twsbc-btn-primary:hover { filter: brightness(1.15); }
.twsbc-btn-primary:disabled { opacity: 0.6; cursor: default; filter: none; }
.twsbc-btn-ghost {
	background: var(--twsbc-bg);
	border-color: var(--twsbc-accent);
	color: var(--twsbc-accent);
	margin-right: 8px;
}
.twsbc-btn-wide { width: 100%; margin-top: 6px; }

/* Payment */
.twsbc-pay-due { font-size: 26px; font-weight: 700; margin: 0 0 12px; }
.twsbc-card { margin: 10px 0 14px; max-width: 460px; }

/* Confirmation */
.twsbc-center { text-align: center; padding-top: 30px; }
.twsbc-check {
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: var(--twsbc-accent-soft);
	color: var(--twsbc-accent);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 12px;
}
.twsbc-summary-card {
	display: inline-block;
	text-align: left;
	border: 1px solid var(--twsbc-border);
	border-radius: 10px;
	padding: 14px 22px;
	margin: 6px 0 14px;
	min-width: 260px;
}
.twsbc-summary-line { font-weight: 700; margin: 4px 0; }
.twsbc-summary-ref { color: var(--twsbc-muted); font-size: 13px; margin: 4px 0 0; }
.twsbc-center .twsbc-btn { margin: 6px 4px 0; }

/* Messages */
.twsbc-hint { color: var(--twsbc-muted); font-size: 13px; margin: 10px 0 0; }
.twsbc-loading { color: var(--twsbc-muted); padding: 60px 0; text-align: center; }
.twsbc-error-banner {
	color: var(--twsbc-error);
	background: #fef2f2;
	border: 1px solid #fecaca;
	border-radius: 8px;
	padding: 10px 12px;
	font-size: 14px;
	margin: 10px 0;
}

/* Mobile */
@media (max-width: 760px) {
	.twsbc-overlay { padding: 0; }
	.twsbc-modal { min-height: 100%; border-radius: 0; max-width: none; }
	.twsbc-layout { flex-direction: column; min-height: 0; }
	.twsbc-side {
		width: auto;
		border-right: 0;
		border-bottom: 1px solid var(--twsbc-border);
		padding: 20px 20px 14px;
	}
	.twsbc-side-title { font-size: 20px; margin-bottom: 8px; }
	.twsbc-meta { margin: 6px 0; }
	.twsbc-main { padding: 20px; }
	.twsbc-calwrap { flex-direction: column; gap: 16px; }
	.twsbc-calendar { max-width: none; }
	.twsbc-times { width: auto; max-height: none; }
	.twsbc-day, .twsbc-blank { width: 44px; height: 44px; }
	.twsbc-grid { gap: 2px; }
}
