/* Sokol Booking – frontend */

.sb-wrap {
	max-width: 1200px;
	margin: 30px auto;
	padding: 0 15px;
}

.sb-card {
	background: #ffffff;
	border-radius: 18px;
	padding: 24px;
	box-shadow: 0 12px 35px rgba(0, 0, 0, 0.06);
	border: 1px solid rgba(0, 0, 0, 0.06);
}

.sb-card h2,
.sb-card h3,
.sb-card h4 {
	margin-top: 0;
	color: #1f2937;
}

.sb-card h2 {
	font-size: 28px;
	font-weight: 700;
	margin-bottom: 10px;
}

.sb-card h3 {
	font-size: 22px;
	font-weight: 700;
	margin-bottom: 10px;
}

.sb-card h4 {
	font-size: 18px;
	font-weight: 700;
	margin-bottom: 14px;
}

.sb-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 12px 18px;
	border-radius: 12px;
	background: #6b7280;
	color: #ffffff;
	text-decoration: none;
	font-weight: 700;
	border: none;
	cursor: pointer;
	transition: 0.2s ease;
	min-height: 48px;
}

.sb-btn:hover,
.sb-btn:focus {
	background: #4b5563;
	color: #ffffff;
	text-decoration: none;
}

.sb-btn:disabled,
.sb-btn[disabled] {
	opacity: 0.55;
	cursor: not-allowed;
}

.sb-grid {
	display: grid;
	gap: 16px;
}

.sb-grid-2 {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.sb-form p {
	margin: 0 0 16px;
}

.sb-form label {
	display: inline-block;
	margin-bottom: 6px;
	color: #111827;
}

.sb-form input[type="text"],
.sb-form input[type="email"],
.sb-form input[type="number"],
.sb-form input[type="date"],
.sb-form input[type="time"],
.sb-form select,
.sb-form textarea {
	width: 100%;
	max-width: 100%;
	padding: 12px 14px;
	border: 1px solid #d1d5db;
	border-radius: 12px;
	background: #ffffff;
	box-sizing: border-box;
	font-size: 15px;
	line-height: 1.4;
	color: #111827;
	transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.sb-form input[type="text"]:focus,
.sb-form input[type="email"]:focus,
.sb-form input[type="number"]:focus,
.sb-form input[type="date"]:focus,
.sb-form input[type="time"]:focus,
.sb-form select:focus,
.sb-form textarea:focus {
	outline: none;
	border-color: #22c55e;
	box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.14);
}

.sb-form textarea {
	min-height: 120px;
	resize: vertical;
}

.sb-notice {
	padding: 13px 15px;
	border-radius: 12px;
	margin: 0 0 18px;
	font-weight: 600;
	border: 1px solid transparent;
}

.sb-notice-success {
	background: #ecfdf5;
	color: #166534;
	border-color: #bbf7d0;
}

.sb-notice-warning {
	background: #fffbeb;
	color: #92400e;
	border-color: #fde68a;
}

.sb-notice-error {
	background: #fef2f2;
	color: #991b1b;
	border-color: #fecaca;
}

/* ===== OBJECT LIST ===== */

.sb-object-card {
	border: 1px solid #e5e7eb;
	border-radius: 16px;
	padding: 18px;
	background: #ffffff;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.sb-object-card__title {
	font-size: 20px;
	font-weight: 700;
	color: #111827;
	margin: 0;
}

.sb-object-card__meta {
	color: #6b7280;
	font-size: 14px;
	margin: 0;
}

.sb-object-card__actions {
	margin-top: auto;
}

/* ===== BOOKING UI ===== */

.sb-booking-ui {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.sb-booking-intro {
	margin-bottom: 18px;
}

.sb-booking-head__right {
	min-width: 0;
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
	margin-top: 0;
	padding: 16px 18px;
	border: 1px solid #dbe4db;
	border-radius: 18px;
	background: linear-gradient(180deg, #f7fbf7 0%, #eff8f0 100%);
	box-shadow: 0 10px 25px rgba(34, 197, 94, 0.06);
}

.sb-booking-head__right label {
	margin-bottom: 10px;
	font-size: 14px;
	color: #166534;
}

.sb-booking-head__right {
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: 16px 18px;
	border: 1px solid #dbe4db;
	border-radius: 18px;
	background: linear-gradient(180deg, #f7fbf7 0%, #eff8f0 100%);
	box-shadow: 0 10px 25px rgba(34, 197, 94, 0.06);
}

.sb-booking-head__right label {
	margin-bottom: 8px;
	font-size: 14px;
	color: #166534;
}

[data-role="date-preview"] {
	display: none !important;
}

.sb-booking-layout {
	display: grid;
	grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.85fr);
	gap: 22px;
	align-items: start;
}

.sb-booking-aside {
	display: flex;
	flex-direction: column;
	gap: 18px;
}

.sb-booking-panel {
	min-width: 0;
}

.sb-panel-card {
	background: #ffffff;
	border: 1px solid #e5e7eb;
	border-radius: 18px;
	padding: 20px;
	box-shadow: 0 8px 25px rgba(0, 0, 0, 0.04);
}

.sb-panel-title {
	margin: 0 0 14px;
	font-size: 18px;
	font-weight: 700;
	color: #111827;
}

[data-role="slots-wrapper"] {
	position: relative;
	min-height: 120px;
	transition: opacity 0.2s ease;
}

[data-role="slots-wrapper"].is-loading {
	opacity: 0.55;
	pointer-events: none;
}

[data-role="slots-wrapper"].is-loading::after {
	content: "Načítání termínů…";
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(255, 255, 255, 0.72);
	backdrop-filter: blur(1px);
	border-radius: 18px;
	font-weight: 700;
	color: #166534;
	z-index: 5;
}

.sb-selected-slot {
	margin-top: 12px;
	padding: 14px 16px;
	border-radius: 14px;
	background: #f9fafb;
	border: 1px solid #e5e7eb;
	color: #111827;
	font-size: 14px;
	line-height: 1.5;
}

[data-role="selected-text"] {
	display: inline-block;
	margin-left: 6px;
	font-weight: 700;
	color: #166534;
}


.sb-selected-price {
	margin-top: 12px;
}

[data-role="selected-price-text"] {
	display: inline-block;
	margin-left: 6px;
	font-weight: 700;
	color: #166534;
}


.sb-actions {
	display: flex;
	justify-content: flex-end;
	margin-top: 18px;
}

/* ===== SLOTS ===== */

.sb-slots-grid,
.sb-blocks-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 12px;
}

.sb-slot-btn {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: center;
	width: 100%;
	min-height: 78px;
	padding: 14px 14px;
	border-radius: 14px;
	border: 1px solid #22c55e;
	background: #ffffff;
	color: #111827;
	cursor: pointer;
	text-align: left;
	transition: 0.2s ease;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.sb-slot-btn:hover,
.sb-slot-btn:focus {
	transform: translateY(-1px);
	border-color: #16a34a;
	box-shadow: 0 8px 18px rgba(22, 163, 74, 0.10);
	outline: none;
}

.sb-slot-btn.is-active {
	background: #16a34a;
	border-color: #16a34a;
	color: #ffffff;
	box-shadow: 0 10px 22px rgba(22, 163, 74, 0.18);
}

.sb-slot-btn.is-disabled,
.sb-slot-btn[disabled] {
	border-color: #d1d5db;
	background: #f3f4f6;
	color: #9ca3af;
	cursor: not-allowed;
	box-shadow: none;
	transform: none;
}

.sb-slot-btn__time {
	font-size: 15px;
	font-weight: 700;
	line-height: 1.2;
	margin-bottom: 5px;
}

.sb-slot-btn__meta {
	font-size: 13px;
	line-height: 1.35;
	opacity: 0.92;
}

.sb-slot-btn--block {
	min-height: 88px;
}

[data-role="duration-select"] {
	max-width: 240px;
	background: #f9fafb;
	font-weight: 700;
}

/* ===== STATUS / LEGEND ===== */

.sb-legend {
	display: flex;
	flex-wrap: wrap;
	gap: 12px 18px;
	margin-top: 16px;
	font-size: 14px;
	color: #374151;
}

.sb-legend__item {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.sb-legend__dot {
	width: 12px;
	height: 12px;
	border-radius: 999px;
	display: inline-block;
}

.sb-legend__dot--free {
	background: #22c55e;
}

.sb-legend__dot--selected {
	background: #16a34a;
}

.sb-legend__dot--taken {
	background: #d1d5db;
}

/* ===== TABLES ===== */

.sb-table-wrap {
	overflow-x: auto;
}

.sb-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
}

.sb-table th,
.sb-table td {
	border-bottom: 1px solid #e5e7eb;
	padding: 10px 12px;
	text-align: left;
	vertical-align: top;
}

.sb-table th {
	font-weight: 700;
	color: #111827;
	background: #f9fafb;
}

/* ===== HELPERS ===== */

.sb-muted {
	color: #6b7280;
}

.sb-text-right {
	text-align: right;
}

.sb-hidden {
	display: none !important;
}

/* ===== RESPONSIVE ===== */

@media (max-width: 980px) {
	.sb-booking-layout {
		grid-template-columns: 1fr;
	}

	.sb-booking-head {
		grid-template-columns: 1fr;
	}

	.sb-booking-head__right {
		max-width: none;
	}

	.sb-slots-grid,
	.sb-blocks-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 640px) {
	.sb-wrap {
		padding: 0 12px;
		margin: 20px auto;
	}

	.sb-card {
		padding: 16px;
		border-radius: 16px;
	}

	.sb-panel-card {
		padding: 16px;
		border-radius: 16px;
	}

	.sb-grid-2 {
		grid-template-columns: 1fr;
	}

	.sb-slots-grid,
	.sb-blocks-grid {
		grid-template-columns: 1fr;
	}

	.sb-slot-btn {
		min-height: 72px;
		padding: 12px 13px;
	}

	.sb-card h2 {
		font-size: 24px;
	}

	.sb-card h3 {
		font-size: 20px;
	}

	.sb-panel-title {
		font-size: 17px;
	}

	.sb-booking-head__right {
		padding: 14px;
	}
}

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

.sb-inline-calendar-wrap {
	margin-top: 2px;
	padding: 6px;
	border-radius: 16px;
	background: rgba(255, 255, 255, 0.55);
}

[data-role="inline-calendar"] .flatpickr-calendar.inline {
	width: 100%;
	max-width: 100%;
	box-shadow: none;
	border: 1px solid #dbe4db;
	border-radius: 16px;
	background: #ffffff;
	padding: 14px 14px 16px;
}

[data-role="inline-calendar"] .flatpickr-months {
	margin-bottom: 10px;
}

[data-role="inline-calendar"] .flatpickr-month {
	height: 40px;
}

[data-role="inline-calendar"] .flatpickr-current-month {
	padding-top: 4px;
	font-size: 15px;
	font-weight: 600;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
}

[data-role="inline-calendar"] .flatpickr-weekdays {
	margin-bottom: 6px;
}

[data-role="inline-calendar"] .flatpickr-weekday {
	font-size: 12px;
	font-weight: 700;
	color: #6b7280;
}

[data-role="inline-calendar"] .flatpickr-days {
	width: 100%;
}

[data-role="inline-calendar"] .dayContainer {
	width: 100%;
	min-width: 100%;
	max-width: 100%;
	justify-content: space-between;
	gap: 6px 0;
}

[data-role="inline-calendar"] .flatpickr-day {
	border-radius: 12px;
	max-width: calc(100% / 7 - 4px);
	height: 34px;
	line-height: 34px;
	font-size: 13px;
	font-weight: 600;
}

[data-role="inline-calendar"] .flatpickr-day.selected,
[data-role="inline-calendar"] .flatpickr-day.startRange,
[data-role="inline-calendar"] .flatpickr-day.endRange {
	background: #16a34a;
	border-color: #16a34a;
}

[data-role="inline-calendar"] .flatpickr-day:hover {
	background: #f0fdf4;
	border-color: #22c55e;
}

@media (max-width: 980px) {
	.sb-booking-layout {
		grid-template-columns: 1fr;
	}

	.sb-booking-head__right {
		order: 1;
	}

	.sb-booking-panel--selection {
		order: 2;
	}

	.sb-booking-panel--form {
		order: 3;
	}

	.sb-booking-aside {
		display: contents;
	}

	.sb-booking-head {
		grid-template-columns: 1fr;
	}

	.sb-booking-head__right {
		max-width: none;
	}

	.sb-slots-grid,
	.sb-blocks-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 640px) {
	[data-role="inline-calendar"] .flatpickr-calendar.inline {
		padding: 8px;
	}

	[data-role="inline-calendar"] .flatpickr-day {
		height: 36px;
		line-height: 36px;
	}
}
[data-role="inline-calendar"] .flatpickr-current-month .flatpickr-monthDropdown-months {
	margin-right: 8px;
}

[data-role="inline-calendar"] .numInputWrapper {
	width: 62px;
	min-width: 62px;
}

[data-role="inline-calendar"] .numInput.cur-year {
	padding-right: 0;
	font-size: 15px;
}

@media (max-width: 480px) {
	[data-role="inline-calendar"] .flatpickr-current-month {
		gap: 12px;
	}

	[data-role="inline-calendar"] .flatpickr-current-month .flatpickr-monthDropdown-months {
		margin-right: 10px;
	}

	[data-role="inline-calendar"] .numInputWrapper {
		width: 68px;
		min-width: 68px;
	}
}
[data-role="inline-calendar"] .numInputWrapper {
	border: none !important;
	background: transparent !important;
	box-shadow: none !important;
}

[data-role="inline-calendar"] .numInput.cur-year {
	border: none !important;
	background: transparent !important;
	font-weight: 600;
}
[data-role="inline-calendar"] .flatpickr-months {
	align-items: center;
}

[data-role="inline-calendar"] .flatpickr-prev-month,
[data-role="inline-calendar"] .flatpickr-next-month {
	top: 8px;
	transform: none;
	font-size: 18px;
	padding: 6px;
}

[data-role="inline-calendar"] .flatpickr-prev-month svg,
[data-role="inline-calendar"] .flatpickr-next-month svg {
	width: 16px;
	height: 16px;
}

[data-role="inline-calendar"] .flatpickr-current-month {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
}
[data-role="inline-calendar"] .flatpickr-months {
	position: relative;
	height: 40px;
}

/* ===== STEP VISIBILITY ===== */

.sb-hidden {
	display: none !important;
}

/* ===== BUTTON STATES ===== */

[data-role="submit"] {
	background: #e40521;
}

[data-role="submit"]:hover {
	background: #c3041c;
}

[data-role="submit"].is-ready {
	background: #16a34a;
}

[data-role="submit"].is-ready:hover {
	background: #15803d;
}

/* zruší šedivění */
[data-role="submit"]:disabled {
	opacity: 1;
	cursor: pointer;
}
/* SUCCESS STATE – po odeslání rezervace */
.sb-booking-ui.sb-booking-success .sb-booking-form {
	display: none !important;
}

.sb-booking-ui.sb-booking-success .sb-notice-success {
	display: block;
	margin-bottom: 20px;
}
.sb-booking-ui--mode-time [data-role="slots-wrapper"].sb-hidden,
.sb-booking-ui--mode-halfday [data-role="slots-wrapper"].sb-hidden,
.sb-booking-ui--mode-day [data-role="slots-wrapper"].sb-hidden {
	display: block !important;
	visibility: hidden;
	pointer-events: none;
	min-height: 420px;
}
/*
.sb-grid-2 {
	display: grid !important;
	grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	gap: 16px !important;
}
.sb-booking-layout {
	display: grid !important;
	grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.85fr) !important;
	gap: 22px !important;
}
*/
/* Událost bez dalšího výběru (např. klubové příspěvky). */
.sb-booking-ui[data-event-layout="simple"] .sb-booking-panel--selection {
	display: none !important;
}

.sb-booking-ui[data-event-layout="simple"] .sb-booking-layout {
	grid-template-columns: minmax(0, 1fr);
}
