/**
 * Booking Arrivée — public booking form.
 *
 * Every selector is scoped under .bkarv to avoid conflicts with themes.
 * Colors configured in the admin arrive as custom properties on .bkarv.
 */

.bkarv {
	--bkarv-accent: #2563eb;
	--bkarv-btn-border: #2563eb;
	--bkarv-btn-bg: #2563eb;
	--bkarv-btn-text: #fff;
	--bkarv-btn-hover-border: #1d4ed8;
	--bkarv-btn-hover-bg: #1d4ed8;
	--bkarv-btn-hover-text: #fff;
	--bkarv-text: #1f2937;
	--bkarv-muted: #6b7280;
	--bkarv-border: #d9e1ec;
	--bkarv-surface: #fff;
	--bkarv-soft: #f5f7fb;
	--bkarv-error: #c62828;
	--bkarv-success: #2e9e5b;
	--bkarv-radius: 8px;
	--bkarv-shadow: 0 2px 12px rgba(31, 41, 55, 0.06);

	box-sizing: border-box;
	color: var(--bkarv-text);
	font-size: 15px;
	line-height: 1.5;
	margin: 0 auto;
	max-width: 1100px;
	width: 100%;
}

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

.bkarv [hidden] {
	display: none !important;
}

.bkarv .bkarv-screen-reader,
.bkarv .bkarv-hp {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute !important;
	width: 1px;
	word-wrap: normal !important;
}

/* Progress ------------------------------------------------------------ */

.bkarv .bkarv-progress {
	margin: 0 0 20px;
}

.bkarv .bkarv-progress__steps {
	display: flex;
	gap: 24px;
	list-style: none;
	margin: 0 0 10px;
	padding: 0;
}

.bkarv .bkarv-progress__step {
	align-items: center;
	color: var(--bkarv-muted);
	display: flex;
	font-weight: 500;
	gap: 8px;
	margin: 0;
}

.bkarv .bkarv-progress__number {
	align-items: center;
	border: 1px solid var(--bkarv-border);
	border-radius: 50%;
	display: inline-flex;
	font-size: 13px;
	height: 26px;
	justify-content: center;
	width: 26px;
}

.bkarv .bkarv-progress__step.is-active,
.bkarv .bkarv-progress__step.is-done {
	color: var(--bkarv-text);
}

.bkarv .bkarv-progress__step.is-active .bkarv-progress__number,
.bkarv .bkarv-progress__step.is-done .bkarv-progress__number {
	background: var(--bkarv-accent);
	border-color: var(--bkarv-accent);
	color: #fff;
}

.bkarv .bkarv-progress__bar {
	background: var(--bkarv-border);
	border-radius: 999px;
	height: 4px;
	overflow: hidden;
}

.bkarv .bkarv-progress__fill {
	background: var(--bkarv-accent);
	display: block;
	height: 100%;
	transition: width 0.3s ease;
	width: 50%;
}

/* Layout -------------------------------------------------------------- */

.bkarv .bkarv-form {
	margin: 0;
}

.bkarv .bkarv-grid {
	display: grid;
	gap: 24px;
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.bkarv .bkarv-card {
	background: var(--bkarv-surface);
	border-radius: var(--bkarv-radius);
	box-shadow: var(--bkarv-shadow);
	height: 100%;
	padding: 24px;
}

.bkarv .bkarv-title {
	color: var(--bkarv-text);
	font-size: 20px;
	font-weight: 600;
	line-height: 1.3;
	margin: 0 0 20px;
}

.bkarv .bkarv-title:focus {
	outline: none;
}

/* Fields -------------------------------------------------------------- */

.bkarv .bkarv-field {
	border: 0;
	margin: 0 0 18px;
	min-width: 0;
	padding: 0;
}

.bkarv .bkarv-label {
	color: var(--bkarv-text);
	display: block;
	font-size: 14px;
	font-weight: 500;
	margin: 0 0 6px;
	padding: 0;
}

.bkarv .bkarv-required {
	color: var(--bkarv-error);
}

.bkarv .bkarv-input {
	appearance: none;
	background: var(--bkarv-surface);
	border: 1px solid var(--bkarv-border);
	border-radius: 6px;
	color: var(--bkarv-text);
	font: inherit;
	line-height: 1.4;
	margin: 0;
	max-width: 100%;
	min-height: 44px;
	padding: 10px 12px;
	width: 100%;
}

.bkarv .bkarv-select {
	background-image: linear-gradient(45deg, transparent 50%, var(--bkarv-muted) 50%), linear-gradient(135deg, var(--bkarv-muted) 50%, transparent 50%);
	background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
	background-repeat: no-repeat;
	background-size: 5px 5px, 5px 5px;
	padding-right: 36px;
}

.bkarv .bkarv-textarea {
	min-height: 110px;
	resize: vertical;
}

.bkarv .bkarv-file {
	padding: 8px;
}

/* Native date/time input with a placeholder overlay (native pickers ignore the placeholder attribute). */
.bkarv .bkarv-native {
	display: block;
	position: relative;
}

.bkarv .bkarv-native__placeholder {
	color: var(--bkarv-muted);
	display: none;
	left: 13px;
	overflow: hidden;
	pointer-events: none;
	position: absolute;
	right: 44px;
	text-overflow: ellipsis;
	top: 50%;
	transform: translateY(-50%);
	white-space: nowrap;
}

.bkarv .bkarv-native.is-empty:not(:focus-within) .bkarv-native__placeholder {
	display: block;
}

.bkarv .bkarv-native.is-empty:not(:focus-within) .bkarv-input {
	color: transparent;
}

.bkarv .bkarv-native .bkarv-input::-webkit-date-and-time-value {
	text-align: left;
}

.bkarv .bkarv-input:focus {
	border-color: var(--bkarv-accent);
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--bkarv-accent) 20%, transparent);
	outline: none;
}

.bkarv .bkarv-field.has-error .bkarv-input {
	border-color: var(--bkarv-error);
}

.bkarv .bkarv-check {
	align-items: flex-start;
	cursor: pointer;
	display: flex;
	gap: 8px;
	margin: 0 0 6px;
}

.bkarv .bkarv-check input {
	accent-color: var(--bkarv-accent);
	flex: 0 0 auto;
	height: 18px;
	margin: 2px 0 0;
	width: 18px;
}

.bkarv .bkarv-check a {
	color: var(--bkarv-accent);
}

.bkarv .bkarv-hint {
	color: var(--bkarv-muted);
	font-size: 13px;
	margin: 6px 0 0;
}

.bkarv .bkarv-error {
	color: var(--bkarv-error);
	font-size: 13px;
	margin: 6px 0 0;
}

.bkarv .bkarv-service-name {
	font-weight: 600;
	margin: 0;
}

.bkarv .bkarv-html {
	margin: 0 0 18px;
}

.bkarv .bkarv-html > :last-child {
	margin-bottom: 0;
}

/* Calendar ------------------------------------------------------------ */

.bkarv .bkarv-schedule {
	border-top: 1px solid var(--bkarv-border);
	margin-top: 8px;
	padding-top: 20px;
}

.bkarv .bkarv-calendar {
	transition: opacity 0.2s ease;
}

.bkarv .bkarv-calendar.is-loading {
	opacity: 0.5;
	pointer-events: none;
}

.bkarv .bkarv-calendar__header {
	align-items: center;
	display: flex;
	justify-content: center;
	gap: 16px;
	margin-bottom: 14px;
}

.bkarv .bkarv-calendar__title {
	font-weight: 600;
	letter-spacing: 0.02em;
	min-width: 150px;
	text-align: center;
	text-transform: uppercase;
}

.bkarv .bkarv-calendar__nav {
	letter-spacing: normal;
	min-width: 0;
	text-transform: none;
	background: transparent;
	border: 0;
	border-radius: 50%;
	color: var(--bkarv-muted);
	cursor: pointer;
	font-size: 22px;
	height: 34px;
	line-height: 1;
	padding: 0;
	width: 34px;
}

.bkarv .bkarv-calendar__nav:hover,
.bkarv .bkarv-calendar__nav:focus,
.bkarv .bkarv-calendar__nav:active {
	background: transparent;
	border: 0;
	box-shadow: none;
	color: var(--bkarv-muted);
}

.bkarv .bkarv-calendar__nav:hover:not(:disabled),
.bkarv .bkarv-calendar__nav:focus-visible {
	background: var(--bkarv-soft);
	color: var(--bkarv-text);
}

.bkarv .bkarv-calendar__nav:disabled {
	cursor: default;
	opacity: 0.3;
}

.bkarv .bkarv-calendar__grid {
	display: grid;
	gap: 4px 0;
	grid-template-columns: repeat(7, minmax(0, 1fr));
	text-align: center;
}

.bkarv .bkarv-calendar__weekday {
	color: var(--bkarv-text);
	font-size: 12px;
	font-weight: 600;
	padding: 6px 0;
	text-transform: uppercase;
}

.bkarv .bkarv-calendar__day {
	letter-spacing: normal;
	min-width: 0;
	text-transform: none;
	background: transparent;
	border: 0;
	border-radius: 50%;
	color: var(--bkarv-muted);
	cursor: default;
	font: inherit;
	font-size: 14px;
	height: 38px;
	justify-self: center;
	line-height: 1;
	padding: 0;
	position: relative;
	width: 38px;
}

/* Neutralize theme button states (hover/focus/active) before applying ours. */
.bkarv .bkarv-calendar__day:hover,
.bkarv .bkarv-calendar__day:focus,
.bkarv .bkarv-calendar__day:active {
	background: transparent;
	border: 0;
	box-shadow: none;
	color: var(--bkarv-muted);
}

.bkarv .bkarv-calendar__day:disabled {
	opacity: 0.45;
}

.bkarv .bkarv-calendar__day.is-available {
	color: var(--bkarv-text);
	cursor: pointer;
	font-weight: 500;
}

.bkarv .bkarv-calendar__day.is-available::after {
	background: var(--bkarv-accent);
	border-radius: 50%;
	bottom: 4px;
	content: "";
	height: 4px;
	left: 50%;
	position: absolute;
	transform: translateX(-50%);
	width: 4px;
}

.bkarv .bkarv-calendar__day.is-available:hover,
.bkarv .bkarv-calendar__day.is-available:focus-visible {
	background: var(--bkarv-soft);
	outline: none;
}

.bkarv .bkarv-calendar__day.is-today {
	box-shadow: inset 0 0 0 1px var(--bkarv-border);
}

.bkarv .bkarv-calendar__day.is-selected,
.bkarv .bkarv-calendar__day.is-selected:hover {
	background: var(--bkarv-accent);
	color: #fff;
}

.bkarv .bkarv-calendar__day.is-selected::after {
	background: #fff;
}

/* Slots --------------------------------------------------------------- */

.bkarv .bkarv-slots {
	margin-top: 20px;
}

.bkarv .bkarv-slots__title {
	font-weight: 600;
	margin: 0 0 12px;
}

.bkarv .bkarv-slots__list {
	display: grid;
	gap: 10px;
	grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
}

.bkarv .bkarv-slot {
	letter-spacing: normal;
	min-width: 0;
	text-transform: none;
	align-items: center;
	background: var(--bkarv-surface);
	border: 1px solid var(--bkarv-border);
	border-radius: 6px;
	box-shadow: 0 1px 2px rgba(31, 41, 55, 0.04);
	color: var(--bkarv-text);
	cursor: pointer;
	display: flex;
	font: inherit;
	font-size: 14px;
	gap: 10px;
	justify-content: center;
	min-height: 42px;
	padding: 8px 12px;
	transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.bkarv .bkarv-slot__indicator {
	border: 1.5px solid var(--bkarv-muted);
	border-radius: 50%;
	flex: 0 0 auto;
	height: 14px;
	position: relative;
	width: 14px;
}

.bkarv .bkarv-slot:hover,
.bkarv .bkarv-slot:focus-visible {
	background: var(--bkarv-surface);
	border-color: var(--bkarv-accent);
	color: var(--bkarv-text);
	outline: none;
}

.bkarv .bkarv-slot.is-selected {
	background: var(--bkarv-accent);
	border-color: var(--bkarv-accent);
	box-shadow: 0 6px 14px rgba(31, 41, 55, 0.18);
	box-shadow: 0 6px 14px color-mix(in srgb, var(--bkarv-accent) 35%, transparent);
	color: #fff;
}

.bkarv .bkarv-slot.is-selected .bkarv-slot__indicator {
	border: 0;
	border-radius: 0;
	height: 12px;
	width: 14px;
}

.bkarv .bkarv-slot.is-selected .bkarv-slot__indicator::before {
	background: #fff;
	content: "";
	height: 2px;
	left: 0;
	position: absolute;
	top: 5px;
	width: 12px;
}

.bkarv .bkarv-slot.is-selected .bkarv-slot__indicator::after {
	border-right: 2px solid #fff;
	border-top: 2px solid #fff;
	content: "";
	height: 7px;
	position: absolute;
	right: 2px;
	top: 2.5px;
	transform: rotate(45deg);
	width: 7px;
}

/* Taken slots: visible for reference, not clickable. */
.bkarv .bkarv-slot.is-unavailable,
.bkarv .bkarv-slot.is-unavailable:hover,
.bkarv .bkarv-slot.is-unavailable:focus {
	background: #fdecec;
	border-color: #f5c2c2;
	box-shadow: none;
	color: #9b1c1c;
	cursor: not-allowed;
	opacity: 1;
}

.bkarv .bkarv-slot.is-unavailable .bkarv-slot__indicator {
	border-color: #e8a3a3;
}

.bkarv .bkarv-slot.is-unavailable .bkarv-slot__label {
	text-decoration: line-through;
}

/* Buttons ------------------------------------------------------------- */

.bkarv .bkarv-actions {
	display: flex;
	justify-content: flex-end;
	margin-top: 8px;
}

.bkarv .bkarv-actions--split {
	gap: 12px;
	justify-content: space-between;
}

.bkarv .bkarv-button {
	letter-spacing: normal;
	min-width: 0;
	text-transform: none;
	align-items: center;
	background: var(--bkarv-btn-bg);
	border: 1px solid var(--bkarv-btn-border);
	border-radius: 6px;
	color: var(--bkarv-btn-text);
	cursor: pointer;
	display: inline-flex;
	font: inherit;
	font-weight: 600;
	gap: 8px;
	justify-content: center;
	line-height: 1.2;
	min-height: 46px;
	padding: 12px 28px;
	text-decoration: none;
	transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.bkarv .bkarv-button:hover,
.bkarv .bkarv-button:focus,
.bkarv .bkarv-button:active {
	background: var(--bkarv-btn-hover-bg);
	border-color: var(--bkarv-btn-hover-border);
	color: var(--bkarv-btn-hover-text);
}

.bkarv .bkarv-button:focus-visible {
	outline: 2px solid var(--bkarv-accent);
	outline-offset: 2px;
}

.bkarv .bkarv-button:disabled {
	cursor: wait;
	opacity: 0.75;
}

.bkarv .bkarv-button--ghost {
	background: transparent;
	border-color: var(--bkarv-border);
	color: var(--bkarv-text);
}

.bkarv .bkarv-button--ghost:hover,
.bkarv .bkarv-button--ghost:focus,
.bkarv .bkarv-button--ghost:active {
	background: var(--bkarv-soft);
	border-color: var(--bkarv-border);
	color: var(--bkarv-text);
}

.bkarv .bkarv-spinner {
	animation: bkarv-spin 0.8s linear infinite;
	border: 2px solid currentColor;
	border-radius: 50%;
	border-right-color: transparent;
	display: inline-block;
	height: 16px;
	width: 16px;
}

@keyframes bkarv-spin {
	to {
		transform: rotate(360deg);
	}
}

/* Review & notices ---------------------------------------------------- */

.bkarv .bkarv-review {
	margin: 0 auto;
	max-width: 720px;
}

.bkarv .bkarv-summary {
	border: 1px solid var(--bkarv-border);
	border-radius: 6px;
	margin: 0 0 20px;
}

.bkarv .bkarv-summary__row {
	display: grid;
	gap: 12px;
	grid-template-columns: minmax(120px, 35%) 1fr;
	padding: 10px 14px;
}

.bkarv .bkarv-summary__row + .bkarv-summary__row {
	border-top: 1px solid var(--bkarv-border);
}

.bkarv .bkarv-summary dt {
	color: var(--bkarv-muted);
	font-weight: 500;
	margin: 0;
}

.bkarv .bkarv-summary dd {
	margin: 0;
	overflow-wrap: anywhere;
	white-space: pre-line;
}

.bkarv .bkarv-recaptcha {
	margin: 0 0 12px;
}

.bkarv .bkarv-notice {
	border-left: 4px solid var(--bkarv-accent);
	border-radius: 6px;
	background: var(--bkarv-soft);
	margin: 0 0 16px;
	padding: 12px 16px;
}

.bkarv .bkarv-notice--error {
	background: #fdecec;
	border-left-color: var(--bkarv-error);
	color: #7f1d1d;
}

.bkarv .bkarv-empty {
	background: var(--bkarv-soft);
	border-radius: var(--bkarv-radius);
	padding: 16px;
	text-align: center;
}

.bkarv .bkarv-success__card {
	margin: 0 auto;
	max-width: 620px;
	text-align: center;
}

.bkarv .bkarv-success__icon {
	background: var(--bkarv-success);
	border-radius: 50%;
	display: inline-block;
	height: 56px;
	margin-bottom: 12px;
	position: relative;
	width: 56px;
}

.bkarv .bkarv-success__icon::after {
	border-bottom: 3px solid #fff;
	border-right: 3px solid #fff;
	content: "";
	height: 22px;
	left: 21px;
	position: absolute;
	top: 12px;
	transform: rotate(45deg);
	width: 12px;
}

.bkarv .bkarv-success__message {
	margin: 0;
}

/* Responsive ---------------------------------------------------------- */

@media (max-width: 782px) {
	.bkarv .bkarv-grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.bkarv .bkarv-card {
		padding: 18px;
	}

	.bkarv .bkarv-actions .bkarv-button {
		width: 100%;
	}

	.bkarv .bkarv-actions--split {
		flex-direction: column-reverse;
	}

	.bkarv .bkarv-summary__row {
		gap: 2px;
		grid-template-columns: minmax(0, 1fr);
	}
}

@media (prefers-reduced-motion: reduce) {
	.bkarv *,
	.bkarv *::before,
	.bkarv *::after {
		animation-duration: 0.01ms !important;
		transition-duration: 0.01ms !important;
	}
}
