.table-responsive {
	overflow-x: auto;
	min-height: 0.01%;
	max-width: 100%;
}

@media screen and (max-width: 767px) {
	.table-responsive {
		width: 100%;
		margin-bottom: 15px;
		overflow-y: hidden;
		-ms-overflow-style: -ms-autohiding-scrollbar;
	}
}

/* Event optional join (Dazuhängen) — same cell/button scale as reserve/delete */
.courtres-event-attach {
	margin-top: 0.35em;
	font-size: inherit;
	line-height: inherit;
	text-align: center;
}
.courtres-event-attach-names {
	display: block;
	margin-bottom: 0.15em;
	text-align: center;
}
.courtres-event-attach-msg {
	display: inline-block;
	margin-top: 0.2em;
}

table.table.reservations {
	table-layout: fixed !important;
	min-width: 600px;
	margin: 0;
}

/* Match both classes so we beat theme/Bootstrap `.table > tbody > tr > td { text-align: left }`. */
table.table.reservations td {
	text-align: center;
	padding: 0.5em;
	height: 6em;
	vertical-align: middle !important;
}

table.table.reservations th {
	text-align: center;
}

.container-reservations .navigator {
	position: sticky;
	left: 0;
	margin-top: 5px;
	margin-bottom: 5px;
	display: flex;
	/* display: none; */
	flex-direction: row;
}

.container-reservations .navigator div:last-child {
	margin-left: auto;
}

.container-reservations .navigator a.button {
	margin: 0 5px;
	display: flex;
	flex-direction: row;
	margin-bottom: 0;
	font-weight: normal;
	text-align: center;
	vertical-align: middle;
	touch-action: manipulation;
	cursor: pointer !important;
	background-image: none;
	white-space: nowrap;
	padding: 6px 12px;
	font-size: inherit;
	line-height: 1.428571;
	border-radius: 4px;
	user-select: none;
	color: #3c4043;
	text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
	background-color: transparent;
	border: 1px solid rgb(218, 220, 224);
	text-decoration: none;
	box-shadow: none;
	padding: 5px 12px;
}

.container-reservations a.button:hover,
.container-reservations a.button--active {
	background-color: #f1f3f4 !important;
}

.container-reservations a.button--active img {
	-webkit-box-shadow: none;
	box-shadow: none;
}


table.reservations a.button {
	margin: 0;
	display: inline-block;
	margin-bottom: 0;
	font-weight: normal;
	text-align: center;
	vertical-align: middle;
	touch-action: manipulation;
	cursor: pointer !important;
	background-image: none;
	/* border: 1px solid #ffffff; */
	border-width: 0;
	white-space: nowrap;
	padding: 6px 12px;
	/* font-size: 14px; */
	font-size: inherit;
	line-height: 1.428571;
	border-radius: 4px;
	user-select: none;
	color: #ffffff;
	text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
	background-color: #b8b3b3;
	/* border-color: #b8b3b3; */
	text-decoration: none;
	box-shadow: none;
}

table.reservations a {
	cursor: pointer;
}

table.reservations td.blocked {
	background-color: #b8b3b3 !important;
	color: #fff;
/*    border-top: 0 none;
	border-bottom: 0 none;*/
}

table.reservations .cr-tooltip {
	position: relative;
	display: inline-block;
	cursor: pointer;
	/* border-bottom: 1px dotted black; */
}

table.reservations .cr-tooltip .cr-tooltiptext {
	visibility: hidden;
	width: 120px;
	background-color: #c6c2c2;
	color: #fff;
	text-align: center;
	padding: 5px 0;
	border-radius: 6px;
	/* Position the tooltip text - see examples below! */
	position: absolute;
	z-index: 1;
	width: 120px;
	bottom: 100%;
	left: 50%;
	margin-left: -60px;
	/* Use half of the width (120/2 = 60), to center the tooltip */
}

table.reservations .cr-tooltip:hover .cr-tooltiptext {
	visibility: visible;
}

/*  add reservation block  */
.cr-dialog-reserve {
	border: 0 !important;
	padding: 0 !important;
	position: relative;
}

/* Modern dialog shell (jQuery UI wrapper) */
.ui-dialog.cr-dialog-modern {
	border: 0 !important;
	border-radius: 6px !important;
	box-shadow: 0 18px 50px rgba(0,0,0,0.18) !important;
	overflow: hidden;
	background: #fff !important;
}
.ui-dialog.cr-dialog-modern .ui-dialog-titlebar {
	border: 0 !important;
	background: #fff !important;
	padding: 16px 16px !important;
	border-bottom: 1px solid rgba(0,0,0,0.06) !important;
	display: flex;
	align-items: center;
	gap: 12px;
}
.ui-dialog.cr-dialog-modern .ui-dialog-title {
	font-weight: 600;
	font-size: 14px;
	line-height: 1.2;
	letter-spacing: -0.01em;
	color: rgba(17, 24, 39, 0.96);
	float: none;
	width: auto;
	margin: 0;
	flex: 1 1 auto;
}
.ui-dialog.cr-dialog-modern .ui-dialog-titlebar-close {
	border: 0 !important;
	background: rgba(15, 23, 42, 0.02) !important;
	border-radius: 10px !important;
	width: 36px !important;
	height: 36px !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	position: relative !important;
	top: auto !important;
	right: auto !important;
	margin: 0 !important;
	transition: all 0.15s ease;
	box-shadow: none !important;
	padding: 0 !important;
	line-height: 0 !important;
}
.ui-dialog.cr-dialog-modern .ui-dialog-titlebar-close:hover {
	background: rgba(15, 23, 42, 0.06) !important;
}
.ui-dialog.cr-dialog-modern .ui-dialog-titlebar-close:active {
	background: rgba(15, 23, 42, 0.08) !important;
	transform: translateY(0.5px);
}
.ui-dialog.cr-dialog-modern .ui-dialog-titlebar-close:focus {
	outline: none;
}
.ui-dialog.cr-dialog-modern .ui-dialog-titlebar-close:focus-visible {
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25) !important;
}

.ui-dialog.cr-dialog-modern .ui-dialog-titlebar-close .ui-button-icon {
	margin: 0 !important;
}
.ui-dialog.cr-dialog-modern .ui-dialog-titlebar-close.ui-button-icon-only .ui-icon {
	position: static !important;
	top: auto !important;
	left: auto !important;
	margin: 0 !important;
}
.ui-dialog.cr-dialog-modern .ui-dialog-titlebar-close .ui-button-icon-space {
	display: none !important;
}
.ui-dialog.cr-dialog-modern .ui-dialog-titlebar-close .ui-icon {
	filter: saturate(0.2);
	opacity: 0.9;
}

/* Modern calendar icon (used by jQuery UI datepicker trigger) */
.ui-icon.ui-icon-calendar {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M8 2v3M16 2v3' stroke='%23111827' stroke-width='2' stroke-linecap='round'/%3E%3Cpath d='M3.5 9h17' stroke='%23111827' stroke-width='2' stroke-linecap='round'/%3E%3Cpath d='M6.5 5h11A3 3 0 0 1 20.5 8v11A3 3 0 0 1 17.5 22h-11A3 3 0 0 1 3.5 19V8A3 3 0 0 1 6.5 5Z' stroke='%23111827' stroke-width='2' stroke-linejoin='round'/%3E%3Cpath d='M7.5 12h2.5M7.5 16h2.5M12 12h2.5M12 16h2.5' stroke='%23111827' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") !important;
	background-position: center !important;
	background-size: 16px 16px !important;
}
.ui-dialog.cr-dialog-modern .ui-dialog-content {
	padding: 12px 16px 16px !important;
}
.ui-dialog.cr-dialog-modern .ui-dialog-buttonpane {
	border: 0 !important;
	background: #fff !important;
	padding: 10px 16px 16px !important;
	border-top: 1px solid rgba(0,0,0,0.06) !important;
}
.ui-dialog.cr-dialog-modern .ui-dialog-buttonset {
	display: flex;
	gap: 10px;
	justify-content: flex-end;
	float: none;
	flex-wrap: wrap;
}
.ui-dialog.cr-dialog-modern .ui-dialog-buttonpane button {
	margin: 0 !important;
}

/* -------------------------------------------------------------------------- */
/* Reservation dialog buttons (modern SaaS style)                               */
/* -------------------------------------------------------------------------- */
.ui-dialog.cr-dialog-modern .ui-dialog-buttonpane button.cr-ui-button {
	appearance: none;
	-webkit-appearance: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;

	height: 40px;
	padding: 10px 16px;
	border-radius: 10px;

	font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
	font-size: 14px;
	font-weight: 600;
	line-height: 1;
	letter-spacing: -0.01em;
	white-space: nowrap;

	border: 1px solid transparent;
	box-shadow: none;
	text-decoration: none;

	cursor: pointer;
	user-select: none;
	touch-action: manipulation;

	transition: all 0.15s ease;
}

.ui-dialog.cr-dialog-modern .ui-dialog-buttonpane button.cr-ui-button:disabled,
.ui-dialog.cr-dialog-modern .ui-dialog-buttonpane button.cr-ui-button[disabled] {
	opacity: 0.55;
	cursor: not-allowed;
	box-shadow: none !important;
	transform: none !important;
}

.ui-dialog.cr-dialog-modern .ui-dialog-buttonpane button.cr-ui-button:focus {
	outline: none;
}

.ui-dialog.cr-dialog-modern .ui-dialog-buttonpane button.cr-ui-button:focus-visible {
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.35);
}

.ui-dialog.cr-dialog-modern .ui-dialog-buttonpane button.cr-ui-button--primary {
	background: #2563eb;
	color: #fff;
	box-shadow: 0 1px 0 rgba(0,0,0,0.06);
}
.ui-dialog.cr-dialog-modern .ui-dialog-buttonpane button.cr-ui-button--primary:hover:not(:disabled) {
	background: #1d4ed8;
	transform: translateY(-1px);
}
.ui-dialog.cr-dialog-modern .ui-dialog-buttonpane button.cr-ui-button--primary:active:not(:disabled) {
	transform: translateY(0);
}

.ui-dialog.cr-dialog-modern .ui-dialog-buttonpane button.cr-ui-button--secondary {
	background: transparent;
	color: rgba(55, 65, 81, 0.92); /* slate-ish */
	border-color: rgba(0,0,0,0.10);
}
.ui-dialog.cr-dialog-modern .ui-dialog-buttonpane button.cr-ui-button--secondary:hover:not(:disabled) {
	background: rgba(0,0,0,0.04);
	border-color: rgba(0,0,0,0.14);
}

.ui-dialog.cr-dialog-modern .ui-dialog-buttonpane button.cr-ui-button.is-loading {
	pointer-events: none;
}

.ui-dialog.cr-dialog-modern .cr-btn__spinner {
	width: 14px;
	height: 14px;
	border-radius: 999px;
	border: 2px solid rgba(255,255,255,0.45);
	border-top-color: rgba(255,255,255,0.95);
	animation: cr-spin 0.8s linear infinite;
}
.ui-dialog.cr-dialog-modern .cr-ui-button--secondary .cr-btn__spinner {
	border-color: rgba(0,0,0,0.18);
	border-top-color: rgba(0,0,0,0.45);
}

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

	.cr-dialog-reserve .ui-dialog-titlebar {
		border-top-left-radius: 6px !important;
		border-top-right-radius: 6px !important;
	}
	.cr-dialog-reserve .ui-dialog-buttonpane {
		border-bottom-left-radius: 6px !important;
		border-bottom-right-radius: 6px !important;
	}
	.cr-dialog-reserve .table.table-striped {
		margin-bottom: 2px;
	}
	.cr-dialog-reserve .table.table-striped td {
		vertical-align: middle;
	}
	.cr-dialog-reserve .table.table-striped td:nth-child(2) {
		border-right-width: 0;
		padding-right: 1em;
	}
	.cr-dialog-reserve .table.table-striped td:nth-child(1) {
		padding-left: 1em;
	}
	.cr-dialog-reserve .ui-dialog-buttonpane {
		border-top-width: 0 !important;
	}
	.cr-dialog-reserve .partner-select {
		width: 100%;
		padding-top: 0;
	}
	.cr-dialog-reserve .partner-row .partners-info {
		padding: 0;
		margin: 0;
	}

i.cr-help{
	display: inline-block;
	font-size: .8em;
}

/*  add reservation form  */
form.resform {
	position: relative;
}
	form.resform select {
		color: #333;
		margin: 0;
	}
form.resform input[type="text"],
form.resform input[list],
form.resform input[type="password"],
form.resform input[type="number"],
form.resform select {
	width: 100%;
	max-width: 100%;
	border-radius: 10px;
	border: 1px solid rgba(0,0,0,0.12);
	padding: 8px 10px;
	box-shadow: none;
}

/* Reservation dialog: 1-column form layout (label above control) */
.cr-dialog-reserve .cr-form-fields {
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.cr-dialog-reserve .cr-field .cr-label {
	color: rgba(0,0,0,0.65);
	font-weight: 600;
	font-size: 12px;
	line-height: 1.2;
	margin-bottom: 6px;
	white-space: nowrap;
}
.cr-dialog-reserve .cr-field .cr-control {
	min-width: 0;
}

/* Backward compatibility: if any table-based rows remain */
form.resform .form-fields-table td:first-child {
	color: rgba(0,0,0,0.65);
	font-weight: 600;
	font-size: 12px;
	white-space: nowrap;
}
form.resform .form-fields-table td {
	padding-top: 6px;
	padding-bottom: 6px;
}
	form.resform #cr-show-login {
		cursor: pointer;
		width: 100%;
		display: inline-flex;
		align-items: center;
		justify-content: flex-start;
		gap: 8px;

		margin-top: 6px;
		padding: 6px 0;

		font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
		font-size: 13px;
		font-weight: 600;
		line-height: 1.2;
		letter-spacing: -0.01em;

		color: #2563eb;
		text-decoration: underline;
		text-underline-offset: 3px;
		text-decoration-thickness: 1px;

		background: transparent;
		border: 0;
		transition: all 0.15s ease;
	}
	form.resform #cr-show-login:hover {
		color: #1d4ed8;
		background: transparent;
	}
	form.resform #cr-show-login:focus {
		outline: none;
	}
	form.resform #cr-show-login:focus-visible {
		border-radius: 8px;
		box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25);
	}
	form.resform .date {
		width: 100%;
	}


.ui-widget-overlay {
	opacity: .50 !important;
	filter: Alpha(Opacity=50) !important;
	background: rgb(50, 50, 50) !important;
}

.cr-login-form input {
	width: 100%;
}

.cr-dialog-alert {}

.cr-dialog-alert .error {
	display: flex;
	align-items: center;
	justify-content: center;
	color: #721c24;
	/* background-color: #f8d7da; */
	/* border-color: #f5c6cb; */
	min-height: 80px;
	line-height: 1.2;
	text-align: center;
}

/* .cr-dialog-reserve .loading {
	background-image: url("images/spinner.gif")
} */

@media only screen and (max-width: 1200px) {
	table.reservations a.button {
		padding: 2px 4px;
	}
}

@media only screen and (max-width: 992px) {
	table.reservations {
		font-size: 0.9em;
	}

	table.reservations a.button {
		padding: 1px 2px;
	}
}

@media only screen and (max-width: 767px) {
	.container-reservations {
		height: 500px !important;
		max-height: 500px !important;
		/* width: 400px !important; */
		/* max-width: 400px !important; */
		overflow: scroll !important;
	}

	table.reservations {
		font-size: 0.9em;
	}

	table.reservations thead th {
		/* position: -webkit-sticky; */
		/* for Safari */
		position: sticky;
		top: 0;
	}

	table.reservations tbody th {
		/* position: -webkit-sticky; */
		/* for Safari */
		position: sticky;
		left: 0;
	}

	table.reservations thead th:first-child {
		left: 0;
		z-index: 1;
	}

	table.reservations td,
	table.reservations th {
		white-space: nowrap;
		word-break: keep-all;
		background: #F8F8F8;
	}

	table.reservations a.button {
		padding: 2px !important;
	}
}

@media only screen and (max-width: 575px) {
	table.reservations {
		font-size: 0.8em;
	}
	.cr-dialog-reserve i.cr-help{
		display: none;
	}
}


/* Preloader */
.cr-preloader {
  display: inline-block;
  position: absolute;
  left: calc(50% - 20px);
  top: calc(50% - 20px);
  width: 40px;
  height: 40px;
  margin: 0 auto;
  border: 4px solid #555;
  border-radius: 50%;
  border-left-color: transparent;
  border-right-color: transparent;
  animation: cssload-spin 950ms infinite linear;
  -o-animation: cssload-spin 950ms infinite linear;
  -ms-animation: cssload-spin 950ms infinite linear;
  -webkit-animation: cssload-spin 950ms infinite linear;
  -moz-animation: cssload-spin 950ms infinite linear; }
@keyframes cssload-spin {
  100% {
	-webkit-transform: rotate(360deg);
	transform: rotate(360deg);
	transform: rotate(360deg); } }
@-webkit-keyframes cssload-spin {
  100% {
	-webkit-transform: rotate(360deg);
	transform: rotate(360deg); } }

.cr-preloader-overlay {
  display: none;
  background: rgba(255, 255, 255, 0.5);
  height: 100%;
  left: 0;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100000; }
.cr-preloader-overlay.in-relative-block {
  position: absolute; }
.cr-preloader-overlay.visible {
  display: block; }
.cr-preloader-overlay#plo-error-dialog {
	background: rgba(0, 0, 0, 0.2);
	display: block;}
