/* Booking Calendar — front-end widget */

.bkc-widget {
	--bkc-accent: #0f9aa8;
	--bkc-accent-dark: #0c7b87;
	--bkc-accent-soft: #b9e2e7;
	--bkc-accent-softer: #e6f4f6;
	--bkc-ink: #1b2a3a;
	--bkc-muted: #8a97a6;
	--bkc-line: #e6e9ee;
	--bkc-radius: 18px;
	--bkc-btn-radius: 10px;

	display: grid;
	grid-template-columns: 1fr 1.4fr 0.9fr;
	gap: 0;
	max-width: 1000px;
	margin: 0 auto;
	background: var(--bkc-card-bg, #fff);
	border: 1px solid var(--bkc-line);
	border-radius: var(--bkc-radius, 18px);
	box-shadow: 0 10px 40px rgba(27, 42, 58, 0.06);
	overflow: hidden;
	color: var(--bkc-ink);
	font-family: inherit;
	box-sizing: border-box;
	/* Sit above any sibling overlay so clicks always reach the widget. */
	position: relative;
	z-index: 1;
}

.bkc-widget *,
.bkc-widget *::before,
.bkc-widget *::after {
	box-sizing: border-box;
}

/* Derive the accent shades from a single --bkc-accent so one colour recolours
   the whole widget (avatar, hovers, days, slots). Falls back to the literal
   teal values above on browsers without color-mix(). */
@supports (color: color-mix(in srgb, red, blue)) {
	.bkc-widget {
		--bkc-accent-dark: color-mix(in srgb, var(--bkc-accent) 82%, #000);
		--bkc-accent-soft: color-mix(in srgb, var(--bkc-accent) 28%, #fff);
		--bkc-accent-softer: color-mix(in srgb, var(--bkc-accent) 12%, #fff);
	}
}

/* Theme hardening: stop the active theme's generic button/input styles from
   leaking into the widget. The .bkc-widget ancestor also raises specificity
   above rules like `.elementor button`. */
.bkc-widget button,
.bkc-widget input,
.bkc-widget textarea {
	font: inherit;
	-webkit-appearance: none;
	appearance: none;
	letter-spacing: normal;
	text-transform: none;
	box-shadow: none;
	min-height: 0;
	line-height: normal;
}

.bkc-widget button {
	background-image: none;
	text-shadow: none;
}

/* Guarantee every interactive control receives pointer events and sits above
   decorative pseudo-elements/overlays from the theme. */
.bkc-widget button,
.bkc-widget input,
.bkc-widget textarea,
.bkc-widget a {
	position: relative;
	z-index: 1;
	pointer-events: auto;
}

/* ---------- Left: summary ---------- */
.bkc-summary {
	padding: 34px 30px;
	border-right: 1px solid var(--bkc-line);
}

.bkc-host {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 28px;
}

.bkc-avatar {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	border-radius: 50%;
	background: var(--bkc-avatar-bg, var(--bkc-accent-soft));
	color: var(--bkc-avatar-color, var(--bkc-accent-dark));
	font-weight: 700;
	font-size: 17px;
	flex: 0 0 auto;
}

.bkc-host-name {
	color: var(--bkc-muted);
	font-size: 16px;
	font-weight: 500;
}

.bkc-event-title {
	font-size: 30px;
	line-height: 1.15;
	font-weight: 800;
	margin: 0 0 18px;
	color: var(--bkc-ink);
}

.bkc-event-duration {
	display: flex;
	align-items: center;
	gap: 8px;
	color: var(--bkc-muted);
	font-size: 16px;
	margin: 0;
}

.bkc-event-duration svg {
	color: var(--bkc-muted);
}

/* ---------- Middle: calendar ---------- */
.bkc-calendar {
	padding: 30px 28px;
	border-right: 1px solid var(--bkc-line);
}

.bkc-cal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 22px;
}

.bkc-cal-month {
	font-size: 20px;
	font-weight: 700;
	margin: 0;
	text-transform: capitalize;
}

.bkc-cal-nav {
	display: flex;
	gap: 8px;
}

.bkc-widget .bkc-nav {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border: 1px solid var(--bkc-line);
	border-radius: var(--bkc-btn-radius, 10px);
	background: var(--bkc-card-bg, #fff);
	color: var(--bkc-accent);
	cursor: pointer;
	transition: background 0.15s, border-color 0.15s, opacity 0.15s;
}

.bkc-widget .bkc-nav:hover:not(:disabled) {
	background: var(--bkc-accent-softer);
	border-color: var(--bkc-accent-soft);
}

.bkc-widget .bkc-nav:disabled {
	opacity: 0.35;
	cursor: not-allowed;
}

.bkc-weekdays {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 4px;
	margin-bottom: 8px;
}

.bkc-weekdays span {
	text-align: center;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.04em;
	color: var(--bkc-muted);
	padding: 6px 0;
}

.bkc-days {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 4px;
}

.bkc-widget .bkc-day {
	position: relative;
	aspect-ratio: 1 / 1;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 0;
	background: transparent;
	border-radius: 50%;
	font-size: 16px;
	font-weight: 600;
	color: var(--bkc-ink);
	cursor: default;
	font-family: inherit;
	padding: 0;
}

.bkc-day.is-empty {
	visibility: hidden;
}

.bkc-widget .bkc-day.is-disabled {
	background: transparent;
	color: var(--bkc-day-disabled, #c4ccd6);
	font-weight: 500;
}

.bkc-widget .bkc-day.is-available {
	background: var(--bkc-day-bg, var(--bkc-accent-soft));
	color: var(--bkc-day-color, var(--bkc-accent-dark));
	cursor: pointer;
	transition: transform 0.12s, background 0.12s;
}

.bkc-widget .bkc-day.is-available:hover {
	background: var(--bkc-day-hover-bg, var(--bkc-accent));
	color: var(--bkc-day-hover-color, #fff);
}

.bkc-widget .bkc-day.is-selected {
	background: var(--bkc-day-selected-bg, var(--bkc-accent-dark));
	color: var(--bkc-day-selected-color, #fff);
}

/* ---------- Right: times / form ---------- */
.bkc-times {
	padding: 30px 26px;
	display: flex;
	flex-direction: column;
	max-height: 560px;
}

.bkc-times-header {
	font-size: 18px;
	font-weight: 700;
	margin: 0 0 18px;
	text-transform: capitalize;
}

.bkc-slots {
	display: flex;
	flex-direction: column;
	gap: 12px;
	overflow-y: auto;
	padding-right: 4px;
}

.bkc-widget .bkc-slot {
	display: block;
	width: 100%;
	padding: 16px;
	border: 1.5px solid var(--bkc-slot-border, var(--bkc-accent-soft));
	border-radius: var(--bkc-btn-radius, 10px);
	background: var(--bkc-slot-bg, #fff);
	color: var(--bkc-slot-color, var(--bkc-accent));
	font-size: 16px;
	font-weight: 700;
	text-align: center;
	cursor: pointer;
	font-family: inherit;
	transition: border-color 0.12s, background 0.12s, color 0.12s;
}

.bkc-widget .bkc-slot:hover {
	border-color: var(--bkc-accent);
	background: var(--bkc-slot-hover-bg, var(--bkc-accent-softer));
}

.bkc-widget .bkc-slot.is-selected {
	background: var(--bkc-slot-selected-bg, var(--bkc-accent));
	border-color: var(--bkc-slot-selected-bg, var(--bkc-accent));
	color: var(--bkc-slot-selected-color, #fff);
}

.bkc-hint,
.bkc-loading,
.bkc-noslots {
	color: var(--bkc-muted);
	font-size: 15px;
	padding: 8px 0;
}

/* ---------- Booking form ---------- */
.bkc-form {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.bkc-form .bkc-field label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	color: var(--bkc-ink);
	margin-bottom: 5px;
}

.bkc-widget .bkc-form input[type="text"],
.bkc-widget .bkc-form input[type="email"],
.bkc-widget .bkc-form input[type="tel"],
.bkc-widget .bkc-form textarea {
	width: 100%;
	padding: 11px 12px;
	border: 1px solid var(--bkc-line);
	border-radius: var(--bkc-btn-radius, 9px);
	font-size: 15px;
	font-family: inherit;
	color: var(--bkc-ink);
	background: var(--bkc-field-bg, #fff);
}

.bkc-widget .bkc-form input:focus,
.bkc-widget .bkc-form textarea:focus {
	outline: none;
	border-color: var(--bkc-accent);
	box-shadow: 0 0 0 3px var(--bkc-accent-softer);
}

.bkc-form textarea {
	resize: vertical;
	min-height: 64px;
}

.bkc-form-actions {
	display: flex;
	gap: 10px;
	margin-top: 4px;
}

.bkc-widget .bkc-btn {
	flex: 1;
	padding: 13px;
	border-radius: var(--bkc-btn-radius, 10px);
	font-size: 15px;
	font-weight: 700;
	cursor: pointer;
	font-family: inherit;
	border: 1.5px solid var(--bkc-accent);
	transition: opacity 0.12s, background 0.12s;
}

.bkc-widget .bkc-btn-primary {
	background: var(--bkc-btn-bg, var(--bkc-accent));
	color: var(--bkc-btn-color, #fff);
}

.bkc-widget .bkc-btn-primary:hover {
	background: var(--bkc-accent-dark);
	border-color: var(--bkc-accent-dark);
}

.bkc-widget .bkc-btn-primary:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.bkc-widget .bkc-btn-ghost {
	flex: 0 0 auto;
	background: var(--bkc-card-bg, #fff);
	color: var(--bkc-accent);
	border-color: var(--bkc-line);
}

.bkc-widget .bkc-btn-ghost:hover {
	background: var(--bkc-accent-softer);
}

.bkc-form-error {
	color: #c0392b;
	font-size: 14px;
	margin: 2px 0 0;
}

.bkc-selected-time {
	background: var(--bkc-accent-softer);
	border-radius: 10px;
	padding: 12px 14px;
	font-size: 15px;
	font-weight: 600;
	color: var(--bkc-accent-dark);
	margin-bottom: 4px;
}

/* ---------- Success ---------- */
.bkc-success {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 14px;
	padding: 20px 4px;
}

.bkc-success-check {
	width: 64px;
	height: 64px;
	border-radius: 50%;
	background: var(--bkc-accent-softer);
	color: var(--bkc-accent);
	display: flex;
	align-items: center;
	justify-content: center;
}

.bkc-success-when {
	font-weight: 700;
	color: var(--bkc-ink);
	font-size: 17px;
}

.bkc-success-msg {
	color: var(--bkc-muted);
	font-size: 15px;
	line-height: 1.5;
	margin: 0;
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
	.bkc-widget {
		grid-template-columns: 1fr;
	}

	.bkc-summary,
	.bkc-calendar {
		border-right: 0;
		border-bottom: 1px solid var(--bkc-line);
	}

	.bkc-event-title {
		font-size: 26px;
	}

	.bkc-times {
		max-height: none;
	}
}

@media (max-width: 480px) {
	.bkc-summary,
	.bkc-calendar,
	.bkc-times {
		padding: 22px 18px;
	}
}
