html,
body {
	margin: 0;

	padding: 0;

	min-height: 100%;

	font-family: Arial, sans-serif;

	color: var(--text-primary);

	padding-bottom: 90px;
}

#backgroundLayer {
	position: fixed;

	inset: 0;

	z-index: -2;

	background: var(--background);

	background-size: cover;
	background-position: center;

	pointer-events: none;
}

.pull-to-refresh {
	--pull-distance: 0px;

	position: fixed;
	top: 0;
	left: 50%;
	z-index: 1000;

	display: grid;
	place-items: center;

	width: 42px;
	height: 42px;
	border-radius: 50%;

	background: rgba(20, 20, 20, 0.82);

	opacity: 0;
	pointer-events: none;
	transform: translate(-50%, calc(-100% + var(--pull-distance)));
	transition: opacity 120ms ease, transform 120ms ease;
}

.pull-to-refresh.is-visible {
	opacity: 1;
	transition: none;
}

.pull-to-refresh-spinner {
	width: 20px;
	height: 20px;
	border: 3px solid rgba(255, 255, 255, 0.35);
	border-top-color: white;
	border-radius: 50%;
	animation: pull-to-refresh-spin 700ms linear infinite;
}

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

/*

=========================

APP CONTAINER

=========================

*/

.container {
	position: relative;

	z-index: 10;

	width: 100%;

	max-width: 420px;

	margin: 0 auto;

	padding: 16px;

	padding-top: 16px;

	box-sizing: border-box;
}

/* =========================
   BRAND HEADER
========================= */

.brand-header {
	display: flex;
	justify-content: center;
	text-align: center;

	padding: 24px 14px;
}

.brand-content {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
}

/* LOGO */

.brand-logo {
	width: 110px;
	height: 110px;

	border-radius: 50%;

	object-fit: cover;

	border: 3px solid rgba(255, 255, 255, 0.35);

	box-shadow:
		0 10px 30px rgba(0, 0, 0, 0.35),
		inset 0 1px 0 rgba(255, 255, 255, 0.25);

	background: rgba(255, 255, 255, 0.15);

	backdrop-filter: blur(8px);

	transition:
		transform 0.2s ease,
		box-shadow 0.2s ease;
}

.brand-logo:hover {
	transform: scale(1.03);

	box-shadow:
		0 14px 40px rgba(0, 0, 0, 0.4),
		inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* TENANT NAME */

.brand-name {
	font-size: 22px;

	font-weight: 700;

	letter-spacing: 0.3px;

	color: var(--text-primary);

	text-align: center;
}

/* MOBILE */

@media (max-width: 420px) {
	.brand-logo {
		width: 96px;
		height: 96px;
	}

	.brand-name {
		font-size: 20px;
	}
}

#flow {
	position: relative;

	z-index: 10;
}

.card {
	background: var(--card-background);

	border: var(--card-border);

	border-radius: var(--card-radius);

	box-shadow: var(--card-shadow);

	backdrop-filter: blur(var(--card-blur));

	padding: 14px;

	margin-bottom: 14px;
}

.btn {
	background: var(--button-background);

	border: var(--button-border);

	border-radius: var(--button-radius);

	padding: 12px;

	margin: 6px 0;

	cursor: pointer;
}

.btn.active {
	background: var(--button-active-background);
}

input,
select {
	background: var(--input-background);

	border: var(--input-border);

	border-radius: var(--input-radius);

	padding: 12px;

	width: 100%;

	box-sizing: border-box;
}

@media (min-width: 500px) {
	body {
		background: var(--color-background);
	}

	#app {
		width: 420px;
	}
}

/* =========================
   LIST ACCORDION
========================= */

.accordion-item {
	margin-bottom: 8px;
}

/* Главная кнопка категории */

.accordion-header {
	display: flex;
	align-items: center;
	justify-content: space-between;

	position: relative;
}

/* стрелка */

.accordion-header::after {
	content: '⌄';
	font-size: 18px;
	line-height: 1;
	transition: transform 0.2s ease;
}

.accordion-header.open::after {
	transform: rotate(180deg);
}

/* вложенный список */

/* =========================
   ACCORDION PANEL
========================= */

.accordion-content {
	margin-top: 8px;

	padding: 8px 0;

	background: rgba(255, 255, 255, 0.08);

	border-radius: 12px;

	overflow: hidden;
}

/* =========================
   SERVICE CHILD ITEMS
========================= */

.accordion-content .child-btn {
	display: flex;

	align-items: center;

	justify-content: space-between;

	width: 100%;

	box-sizing: border-box;

	padding: 12px 14px;

	margin: 0;

	background: transparent;

	border: none;
}

/* название */

.service-name {
	flex: 1;
	text-align: left;
	padding-right: 20px;
}

/* цена */

.service-price {
	text-align: right;

	font-weight: 600;

	white-space: nowrap;

	opacity: 0.9;
}

.service-actions {
	display: flex;

	align-items: center;

	justify-content: flex-end;

	gap: 12px;

	flex: none;
}

/* эффект списка */

.accordion-content .child-btn:hover {
	background: rgba(255, 255, 255, 0.1);
}

/* дочерние элементы */

.child-btn {
	font-size: 14px;

	padding: 10px 12px;

	margin: 6px 0;

	opacity: 0.85;
}

/* выбранная категория */

.accordion-header.active {
	opacity: 1;
}

/* =========================
   CARD RENDERER
========================= */

.card-list {
	display: grid;

	grid-template-columns: repeat(2, 1fr);

	gap: 16px;

	margin-top: 16px;
}

.card-item {
	width: 100%;

	box-sizing: border-box;

	display: flex;

	flex-direction: column;

	align-items: center;

	padding: 16px 10px;

	cursor: pointer;

	background: rgba(255, 255, 255, 0.12);

	border: 1px solid rgba(255, 255, 255, 0.18);

	border-radius: 20px;

	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);

	transition:
		transform 0.15s ease,
		border-color 0.15s ease,
		background 0.15s ease;
}

.card-item:active {
	transform: scale(0.97);
}

.card-item.selected {
	opacity: 1;
	background: rgba(255, 255, 255, 0.18);
	box-shadow: 0 12px 35px rgba(0, 0, 0, 0.35);
	transform: translateY(-2px);
}

.card-item.muted {
	opacity: 0.25;
	filter: grayscale(40%);
}

.card-item-image {
	width: 90px;

	height: 90px;

	border-radius: 50%;

	border: 2px solid rgba(255, 255, 255, 0.72);

	box-sizing: border-box;

	object-fit: cover;

	background: linear-gradient(135deg, #a064dc, #55ccd2);

	margin-bottom: 12px;
}

.card-item-title {
	font-size: 16px;

	font-weight: 600;

	text-align: center;

	color: var(--text-primary);
}

/* =========================
   CALENDAR
========================= */

.calendar-head {
	display: flex;

	justify-content: space-between;

	align-items: center;

	margin-bottom: 16px;
}

.calendar-head button {
	width: 36px;

	height: 36px;

	border-radius: 10px;

	border: 1px solid rgba(255, 255, 255, 0.18);

	background: rgba(150, 150, 150, 0.1);

	backdrop-filter: blur(8px);

	cursor: pointer;

	font-size: 18px;
}

.calendar-title {
	font-size: 18px;

	font-weight: 600;

	text-align: center;
}

/* grid */

.calendar {
	display: grid;

	grid-template-columns: repeat(7, 1fr);

	gap: 6px;
}

/* empty cells */

.calendar > div:not(.day) {
	height: 40px;
}

.day {
	height: 40px;

	display: flex;

	align-items: center;

	justify-content: center;

	border-radius: 10px;

	background: rgba(255, 255, 255, 0.12);

	border: 1px solid rgba(255, 255, 255, 0.18);

	cursor: pointer;

	transition:
		background 0.2s ease,
		transform 0.15s ease,
		opacity 0.2s ease;
}

/* unavailable */

.day.disabled {
	opacity: 0.25;

	pointer-events: none;
}

/* selected */

.day.selected {
	background: rgba(255, 255, 255, 0.35);

	transform: translateY(-2px);
}

/* =========================
   SLOT SELECT
========================= */

.slot-select {
	width: 100%;

	padding: 12px 14px;

	border-radius: 10px;

	box-sizing: border-box;

	font-size: 16px;

	font-family: inherit;

	background: rgba(255, 255, 255, 0.12);

	border: 1px solid rgba(255, 255, 255, 0.18);

	color: #000;

	backdrop-filter: blur(8px);

	-webkit-backdrop-filter: blur(8px);

	cursor: pointer;

	outline: none;

	appearance: none;

	-webkit-appearance: none;

	background-image: linear-gradient(45deg, transparent 50%, #555 50%), linear-gradient(135deg, #555 50%, transparent 50%);

	background-position:
		calc(100% - 18px) 50%,
		calc(100% - 12px) 50%;

	background-size:
		6px 6px,
		6px 6px;

	background-repeat: no-repeat;
}

.slot-select:focus {
	border-color: rgba(255, 255, 255, 0.45);

	box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.12);
}

/* options */

.slot-select option {
	background: #ffffff;

	color: #000;

	font-size: 16px;
}

.slot-select option:disabled {
	color: #999;
}

/* =========================
   FORM RENDERER
========================= */

.form-fields {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

/* поля клиента */

.form-fields input {
	width: 100%;

	padding: 12px 14px;

	box-sizing: border-box;

	border-radius: var(--input-radius);

	background: var(--input-background);

	border: var(--input-border);

	color: var(--text-primary);

	font-size: 16px;

	font-family: inherit;

	outline: none;
}

.form-fields input::placeholder {
	opacity: 0.6;
}

/* фокус поля */

.form-fields input:focus {
	border-color: rgba(255, 255, 255, 0.45);

	box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.12);
}

/* =========================
   BOOK BUTTON
========================= */

.reserve-btn {
	width: 100%;

	padding: 14px;

	margin-top: 16px;

	border-radius: var(--button-radius);

	border: var(--button-border);

	background: var(--button-active-background);

	color: var(--text-primary);

	font-size: 16px;

	font-weight: 600;

	cursor: pointer;

	transition:
		transform 0.15s ease,
		opacity 0.15s ease;
}

.reserve-btn:active {
	transform: scale(0.97);
}

/* fallback если id book остался */

#book {
	width: 100%;

	padding: 14px;

	margin-top: 16px;

	border-radius: var(--button-radius);

	border: var(--button-border);

	background: var(--button-active-background);

	color: var(--text-primary);

	font-size: 16px;

	font-weight: 600;

	cursor: pointer;
}

#book:active {
	transform: scale(0.97);
}

/* =========================
   MODAL
========================= */

.modal {
	position: fixed;
	inset: 0;

	display: none;

	align-items: center;
	justify-content: center;

	background: rgba(0, 0, 0, 0.45);

	backdrop-filter: blur(8px);

	z-index: 1000;
}

.modal.open {
	display: flex;
}

.modal-card {
	width: 100%;
	max-width: 420px;

	background: var(--card-background);
	border: var(--card-border);
	border-radius: var(--card-radius);
	box-shadow: var(--card-shadow);
	backdrop-filter: blur(var(--card-blur));

	padding: 20px;
	box-sizing: border-box;
}

/* Interactive Turnstile challenges must remain usable above booking modals. */
#turnstile-container {
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	z-index: 1101;
	visibility: hidden;
	pointer-events: none;
}

#turnstile-container.active {
	visibility: visible;
	pointer-events: auto;
}

#turnstile-container.active::before {
	content: '';
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.45);
	backdrop-filter: blur(4px);
	z-index: -1;
}

.summary-actions {
	display: flex;
	flex-wrap: wrap;

	gap: 12px;

	margin-top: 20px;
}

.summary-error {
	flex: 0 0 100%;
	margin: 0;
}

.summary-actions .btn {
	flex: 1;
}

.summary-json {
	max-height: 260px;

	overflow: auto;

	white-space: pre-wrap;

	word-break: break-word;

	font-size: 13px;
}

.summary-data {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-top: 20px;
}

.summary-row {
	display: flex;

	justify-content: space-between;

	align-items: center;

	gap: 30px;

	padding: 8px 0;

	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.summary-label {
	opacity: 0.65;

	font-size: 14px;
}

.summary-value {
	text-align: right;

	font-weight: 600;
}

#footer {
	position: fixed;

	left: 0;
	right: 0;
	bottom: 0;

	min-height: 110px;

	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	gap: 12px;

	background: rgba(0, 0, 0, 0.25);

	backdrop-filter: blur(12px);

	-webkit-backdrop-filter: blur(12px);

	border-top: 1px solid rgba(255, 255, 255, 0.15);

	z-index: 500;
}

.footer-btn {
	width: 48px;
	height: 48px;

	display: flex;
	align-items: center;
	justify-content: center;

	border-radius: 50%;

	background: rgba(255, 255, 255, 0.52);

	border: 1px solid rgba(255, 255, 255, 0.18);

	color: white;

	text-decoration: none;

	font-size: 24px;

	backdrop-filter: blur(8px);
}

.footer-btn:active {
	transform: scale(0.95);
}

.footer-btn-primary {
	background: rgba(255, 255, 255, 0.78);
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

.footer-btn-sms {
	font-size: 14px;
	font-weight: 800;
	letter-spacing: 0.3px;
}

.client-bookings-container {
	margin-bottom: 16px;

	padding: 14px;

	border-radius: 12px;

	background: var(--card-bg);
}

.client-bookings-title {text-align: center;}

.client-bookings-header {
	font-weight: 600;

	font-size: 16px;

	margin-bottom: 12px;
}

.client-bookings-list {
	display: flex;

	flex-direction: column;

}

.client-booking-item {

	display:flex;

	justify-content:space-between;

	align-items:center;

	margin-bottom: 14px;

	padding:14px;

	box-shadow: var(--card-shadow);

	border-radius: var(--card-radius);

	border: var(--card-border);

	background: var(--card-background);;
	backdrop-filter: blur(var(--card-blur));

}

.booking-content {

	flex:1;

}


.booking-title {

	font-weight:600;

}


.booking-subtitle {

	margin-top:4px;

	opacity:0.7;

}


.booking-time {

	margin-top:8px;

	font-size:14px;

}



.booking-cancel {

	font-size: 14px;

	flex-shrink:0;

	width:auto;

	padding:8px 14px;

	border-radius:8px;

	border:none;

	cursor:pointer;

}

.footer-credit {
	flex-basis: 100%;
	width: 100%;
	text-align: center;
	margin-top: 5px;
	font-size: 12px;
	opacity: 0.55;
}

.footer-credit a {
	color: inherit;
	text-decoration: none;
}

.footer-buttons {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 20px;
}

.node-title {

	display: flex;

	justify-content: space-between;

	align-items: center;

	gap: 12px;

}

.new-service-btn {

	font-size: 14px;

	flex-shrink: 0;

	width: auto;

	padding: 8px 14px;

	border-radius: 8px;

	border: none;

	cursor: pointer;

}

.guest-count-control {
	display: grid;
	grid-template-columns: 64px minmax(80px, 1fr) 64px;
	align-items: center;
	max-width: 300px;
	margin: 24px auto 12px;
	text-align: center;
}

.guest-count-control button {
	height: 56px;
	border: var(--glass-button-border, 1px solid rgba(255,255,255,.18));
	border-radius: 50%;
	background: var(--glass-button-background, rgba(255,255,255,.1));
	color: inherit;
	font-size: 28px;
	cursor: pointer;
}

.guest-count-label {
	display: block;
	margin-top: 18px;
	text-align: center;
	font-size: 14px;
	opacity: .82;
}

.guest-count-control input {
	width: 100%;
	min-width: 0;
	padding: 8px 4px;
	box-sizing: border-box;
	border: 0;
	background: transparent;
	color: inherit;
	font: inherit;
	font-size: 38px;
	font-weight: 700;
	text-align: center;
	-moz-appearance: textfield;
}

.guest-count-control input::-webkit-inner-spin-button,
.guest-count-control input::-webkit-outer-spin-button {
	margin: 0;
	-webkit-appearance: none;
}

.guest-count-control input:focus {
	outline: 2px solid rgba(255,255,255,.55);
	outline-offset: 2px;
	border-radius: 10px;
}

.form-error {
	color: #fff;
	background: rgba(110, 0, 20, .48);
	border: 1px solid rgba(255,255,255,.3);
	border-radius: 10px;
	padding: 10px 12px;
	font-size: 14px;
}

.guest-count-error {
	margin: 0 0 12px;
	text-align: center;
}

.renderer-note {
	margin: 0 0 20px;
	text-align: center;
	opacity: .72;
	font-size: 13px;
}

.duration-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
	margin: 20px 0;
}

.duration-grid button {
	min-height: 54px;
	border: var(--glass-button-border, 1px solid rgba(255,255,255,.18));
	border-radius: var(--glass-button-radius, 10px);
	background: var(--glass-button-background, rgba(255,255,255,.1));
	color: inherit;
	cursor: pointer;
}

.duration-grid button.selected {
	background: var(--glass-button-active-background, rgba(255,255,255,.25));
	box-shadow: 0 0 0 2px currentColor inset;
}

.fixed-duration {
	margin: 20px 0;
	padding: 20px;
	border: var(--glass-card-border, 1px solid rgba(255,255,255,.18));
	border-radius: var(--glass-button-radius, 10px);
	display: grid;
	gap: 5px;
	text-align: center;
}

.fixed-duration strong { font-size: 28px; }
.fixed-duration span { opacity: .72; font-size: 13px; }

body.embedded-booking {
	min-height: 0;
	background-attachment: scroll;
}

body.embedded-booking .container {
	max-width: 760px;
	padding-top: 20px;
	padding-bottom: 30px;
}

body.embedded-booking #footer,
body.embedded-booking .pull-to-refresh {
	display: none !important;
}
