.tv-booking,
.tv-booking *,
.tv-booking *::before,
.tv-booking *::after {
	box-sizing: border-box;
}

.tv-booking {
	--tv-accent: #269dcd;
	position: fixed;
	z-index: 999999;
	left: 50%;
	bottom: calc(max(12px, env(safe-area-inset-bottom)) + var(--tv-booking-cookie-offset, 0px));
	transform: translateX(-50%);
	width: min(980px, calc(100vw - 24px));
	padding: 12px;
	border: 1px solid #e4e8eb;
	border-radius: 12px;
	background: rgba(255, 255, 255, .98);
	box-shadow: 0 8px 30px rgba(23, 42, 53, .18);
	color: #30424d;
	font-family: inherit;
	font-size: 14px;
	line-height: 1.3;
	transition: background-color .2s ease, box-shadow .2s ease, bottom .2s ease;
}

.tv-booking.is-scrolled {
	background: rgba(255, 255, 255, .72);
	box-shadow: 0 6px 22px rgba(23, 42, 53, .15);
	-webkit-backdrop-filter: blur(14px);
	backdrop-filter: blur(14px);
}

.tv-booking[hidden],
.tv-booking [hidden] {
	display: none !important;
}

body.tv-booking-enabled {
	padding-bottom: calc(var(--tv-booking-height, 90px) + 22px);
}

.tv-booking button,
.tv-booking select {
	font: inherit;
}

.tv-booking button {
	cursor: pointer;
}

.tv-booking button:focus-visible,
.tv-booking select:focus-visible {
	outline: 3px solid rgba(38, 157, 205, .38);
	outline-offset: 2px;
}

.tv-booking__form {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.1fr) minmax(0, 1.05fr) auto;
	align-items: end;
	gap: 9px;
	margin: 0;
}

.tv-booking__field {
	position: relative;
	min-width: 0;
}

.tv-booking__label {
	display: block;
	margin: 0 0 4px 2px;
	color: #54636c;
	font-size: 12px;
	font-weight: 600;
}

.tv-booking__control {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	height: 42px;
	margin: 0;
	padding: 0 11px;
	border: 1px solid #b9c2c9;
	border-radius: 7px;
	background: rgba(255, 255, 255, .96);
	color: #30424d;
	font-size: 13px;
	font-weight: 400;
	text-align: left;
	white-space: nowrap;
}

.tv-booking__date-button::after {
	content: "▦";
	margin-left: 8px;
	color: #66737b;
	font-size: 18px;
}

.tv-booking__control:hover,
.tv-booking__control[aria-expanded="true"] {
	border-color: var(--tv-accent);
}

.tv-booking .tv-booking__control:hover,
.tv-booking .tv-booking__control:focus,
.tv-booking .tv-booking__control:active {
	background: #fff;
	color: #30424d;
}

.tv-booking__control span:first-child {
	overflow: hidden;
	text-overflow: ellipsis;
}

.tv-booking select.tv-booking__control {
	padding-right: 7px;
	appearance: auto;
}

.tv-booking__submit {
	min-width: 133px;
	height: 42px;
	margin: 0;
	padding: 0 15px;
	border: 1px solid var(--tv-accent);
	border-radius: 7px;
	background: var(--tv-accent);
	color: #fff;
	font-size: 14px;
	font-weight: 700;
	white-space: nowrap;
	transition: background-color .15s ease, border-color .15s ease;
}

.tv-booking__submit:hover {
	border-color: #187ba4;
	background: #187ba4;
}

.tv-booking .tv-booking__submit:hover,
.tv-booking .tv-booking__submit:focus,
.tv-booking .tv-booking__submit:active {
	border-color: #187ba4;
	background: #187ba4;
	color: #fff;
}

.tv-booking__submit span {
	margin-left: 5px;
}

.tv-booking__error {
	grid-column: 1 / -1;
	margin: 0 2px;
	color: #a32929;
	font-size: 12px;
}

.tv-booking__calendar,
.tv-booking__guests-panel {
	position: absolute;
	z-index: 2;
	border: 1px solid #e0e6e9;
	border-radius: 10px;
	background: #fff;
	box-shadow: 0 12px 35px rgba(23, 42, 53, .2);
	color: #30424d;
}

.tv-booking__calendar {
	right: 0;
	bottom: calc(100% + 10px);
	width: min(635px, 100%);
	max-height: calc(100dvh - 130px);
	padding: 14px;
	overflow-y: auto;
}

.tv-booking__calendar-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-bottom: 10px;
}

.tv-booking__calendar-head p {
	margin: 0;
	font-size: 13px;
	font-weight: 600;
	text-align: center;
}

.tv-booking__calendar-head button {
	width: 34px;
	height: 34px;
	padding: 0;
	border: 1px solid #d7dfe3;
	border-radius: 6px;
	background: #fff;
	color: #30424d;
	font-size: 24px;
	line-height: 1;
}

.tv-booking__calendar-head button:disabled {
	cursor: default;
	opacity: .35;
}

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

.tv-booking__month-title {
	margin: 0 0 9px;
	font-size: 14px;
	font-weight: 700;
	text-align: center;
}

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

.tv-booking__weekday {
	padding: 5px 0;
	color: #69757c;
	font-size: 11px;
}

.tv-booking__day {
	min-width: 0;
	height: 35px;
	padding: 0;
	border: 0;
	border-radius: 6px;
	background: transparent;
	color: #30424d;
	font-size: 12px;
}

.tv-booking__day:hover:not(:disabled) {
	background: #e4f4fa;
}

.tv-booking .tv-booking__day:focus:not(:disabled),
.tv-booking .tv-booking__day:active:not(:disabled) {
	background: #e4f4fa;
	color: #30424d;
}

.tv-booking__day:disabled {
	cursor: default;
	color: #b4bdc2;
}

.tv-booking__day.is-selected {
	background: var(--tv-accent);
	color: #fff;
}

.tv-booking .tv-booking__day.is-selected:focus {
	background: var(--tv-accent);
	color: #fff;
}

.tv-booking__day.is-in-range {
	background: #e4f4fa;
}

.tv-booking__guests-panel {
	left: 0;
	bottom: calc(100% + 10px);
	width: 220px;
	padding: 12px 14px;
}

.tv-booking__guest-row,
.tv-booking__stepper {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.tv-booking__guest-row + .tv-booking__guest-row {
	margin-top: 12px;
}

.tv-booking__stepper {
	gap: 11px;
}

.tv-booking__stepper button {
	width: 28px;
	height: 28px;
	padding: 0;
	border: 1px solid #d7dfe3;
	border-radius: 50%;
	background: #f5f7f8;
	color: #30424d;
	font-size: 17px;
	line-height: 1;
}

.tv-booking__stepper button:disabled {
	cursor: default;
	opacity: .4;
}

.tv-booking__stepper output {
	min-width: 16px;
	text-align: center;
}

.tv-booking.is-cookie-constrained {
	top: 12px;
	bottom: auto;
}

.tv-booking.is-cookie-constrained .tv-booking__calendar,
.tv-booking.is-cookie-constrained .tv-booking__guests-panel {
	top: calc(100% + 10px);
	bottom: auto;
}

@media (max-width: 720px) {
	.tv-booking__form {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.tv-booking__submit {
		grid-column: 1 / -1;
		width: 100%;
	}

	.tv-booking__calendar {
		max-height: calc(100dvh - 190px);
	}
}

@media (max-width: 560px) {
	.tv-booking {
		width: calc(100vw - 16px);
		padding: 9px;
	}

	.tv-booking__form {
		gap: 6px;
	}

	.tv-booking__label {
		font-size: 11px;
	}

	.tv-booking__control {
		height: 38px;
		padding: 0 8px;
		font-size: 12px;
	}

	.tv-booking__submit {
		height: 38px;
	}

	.tv-booking__months {
		grid-template-columns: minmax(0, 1fr);
	}

	.tv-booking__month:nth-child(2) {
		display: none;
	}

	.tv-booking__calendar {
		padding: 10px;
		max-height: calc(100dvh - 190px);
	}

	.tv-booking__guests-panel {
		width: min(220px, calc(100vw - 32px));
	}
}

@media (prefers-reduced-motion: reduce) {
	.tv-booking,
	.tv-booking__submit {
		transition: none;
	}
}
