/* Premium Stylesheet for TCN Booking Version 6.4 */

#tcn-booking-v6_4-app {
	font-family: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	max-width: 100%;
	margin: 20px auto;
	padding: 24px;
	background: #ffffff;
	border-radius: 16px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.04);
	color: #1e293b;
	box-sizing: border-box;
}

/* Header Styles */
.tcn-v6_4-booking-header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	margin-bottom: 24px;
	border-bottom: 2px solid #f1f5f9;
	padding-bottom: 20px;
	flex-wrap: wrap;
	gap: 20px;
}

.tcn-v6_4-header-left h2 {
	margin: 0 0 8px 0;
	font-size: 1.8rem;
	font-weight: 700;
	color: #0f172a;
	letter-spacing: -0.02em;
}

.tcn-v6_4-license-warning {
	background: #fffbeb;
	border-left: 4px solid #f59e0b;
	color: #b45309;
	padding: 10px 14px;
	border-radius: 8px;
	font-size: 0.88rem;
	margin-bottom: 12px;
	display: flex;
	align-items: center;
	gap: 8px;
	font-weight: 500;
}

.tcn-v6_4-user-greeting {
	margin: 0;
	color: #475569;
	font-size: 0.95rem;
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
}

.tcn-v6_4-user-greeting strong {
	color: #0f172a;
}

.tcn-v6_4-pw-change-trigger {
	color: #3b82f6;
	text-decoration: none;
	font-weight: 600;
	display: inline-flex;
	align-items: center;
	gap: 4px;
	transition: color 0.2s ease;
}
.tcn-v6_4-pw-change-trigger:hover {
	color: #1d4ed8;
	text-decoration: underline;
}

.tcn-v6_4-logout-link {
	color: #ef4444;
	text-decoration: none;
	font-weight: 600;
	display: inline-flex;
	align-items: center;
	gap: 4px;
	transition: color 0.2s ease;
}
.tcn-v6_4-logout-link:hover {
	color: #b91c1c;
	text-decoration: underline;
}

.tcn-v6_4-header-right {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 12px;
}

@media (max-width: 767px) {
	.tcn-v6_4-header-right {
		align-items: flex-start;
		width: 100%;
	}
}

.tcn-v6_4-btn-auth-trigger {
	background: #0f172a;
	color: #ffffff;
	border: none;
	padding: 10px 18px;
	border-radius: 8px;
	font-weight: 600;
	font-size: 0.92rem;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	transition: background-color 0.2s ease, transform 0.1s ease;
}
.tcn-v6_4-btn-auth-trigger:hover {
	background: #1e293b;
}
.tcn-v6_4-btn-auth-trigger:active {
	transform: scale(0.98);
}

.tcn-v6_4-date-selector {
	display: flex;
	align-items: center;
	gap: 10px;
}

.tcn-v6_4-date-selector label {
	font-weight: 600;
	font-size: 0.9rem;
	color: #475569;
}

.tcn-v6_4-date-selector input[type="date"] {
	padding: 8px 12px;
	border: 1px solid #cbd5e1;
	border-radius: 8px;
	font-size: 0.95rem;
	font-family: inherit;
	color: #0f172a;
	background-color: #f8fafc;
	font-weight: 600;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.tcn-v6_4-date-selector input[type="date"]:focus {
	outline: none;
	border-color: #3b82f6;
	box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

/* Grid System & Loading */
.tcn-v6_4-grid-wrapper {
	position: relative;
	min-height: 250px;
	background: #f8fafc;
	border-radius: 12px;
	padding: 12px;
	border: 1px solid #e2e8f0;
}

.tcn-v6_4-loading {
	position: absolute;
	top: 0; left: 0; right: 0; bottom: 0;
	background: rgba(248, 250, 252, 0.85);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	font-weight: 600;
	color: #0f172a;
	z-index: 100;
	border-radius: 12px;
	gap: 12px;
}

.tcn-v6_4-spinner {
	width: 32px;
	height: 32px;
	border: 3px solid #cbd5e1;
	border-top-color: #0f172a;
	border-radius: 50%;
	animation: tcn-v6_4-spin 0.8s linear infinite;
}

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

/* Grid Layout: Responsive! */
/* Mobile: exactly 3 columns side-by-side, wrapping vertically */
.tcn-v6_4-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 12px;
}

/* PC and Tablet Mode: arranged horizontally side-by-side, no wrapping */
@media (min-width: 768px) {
	.tcn-v6_4-grid {
		display: flex;
		flex-direction: row;
		flex-wrap: nowrap;
		overflow-x: auto;
		gap: 12px;
		padding-bottom: 8px;
	}
	.tcn-v6_4-court-col {
		flex: 1 1 0;
		min-width: var(--tcn-v6_4-col-width, 120px);
	}
}

.tcn-v6_4-court-col {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.tcn-v6_4-court-header {
	background: #0f172a;
	color: #ffffff;
	padding: 10px;
	text-align: center;
	font-weight: 700;
	font-size: 0.95rem;
	border-radius: 8px;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

/* Slot Styling - enforces identical height for all states */
.tcn-v6_4-slot {
	box-sizing: border-box;
	padding: 6px;
	border-radius: 8px;
	text-align: center;
	font-size: var(--tcn-v6_4-font-size, 0.8rem);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	height: var(--tcn-v6_4-slot-height, 70px);
	min-height: var(--tcn-v6_4-slot-height, 70px);
	max-height: var(--tcn-v6_4-slot-height, 70px);
	overflow: hidden;
	transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
	border: 1px solid #e2e8f0;
	position: relative;
}

.tcn-v6_4-slot-time {
	font-weight: 900;  
	margin-bottom: 4px;
	background: rgba(15, 23, 42, 0.05);
	padding: 2px 6px;
	border-radius: 4px;
	font-size: 1.0rem; /* mse changed from 0.7rem to 1.0rem */
	color: #334155;
	display: inline-block;
	white-space: nowrap;
}

/* Slot Status Colors */
.tcn-v6_4-slot-past {
	background: #f1f5f9;
	color: #94a3b8;
	border-color: #cbd5e1;
}
.tcn-v6_4-slot-past .tcn-v6_4-slot-time {
	background: rgba(148, 163, 184, 0.1);
	color: #94a3b8;
}

.tcn-v6_4-slot-booked {
	background: #fee2e2;
	color: #991b1b;
	border-color: #fca5a5;
	font-weight: 500;
}
.tcn-v6_4-slot-booked .tcn-v6_4-slot-time {
	background: rgba(153, 27, 27, 0.08);
	color: #991b1b;
}

/* Namen-Wrapper: alle Namen (Buchender + Mitspieler) werden untereinander
   dargestellt. Die Basis-Schriftgröße wird per JS (autofitSlotNames) dynamisch
   an die tatsächlich verfügbare Boxgröße angepasst, damit auch bei vielen
   Namen (Doppel = 4 Spieler) oder kleinen Boxen (Mobile 3-Spalten-Grid)
   alles lesbar bleibt, ohne die Box zu sprengen. */
.tcn-v6_4-names-wrap {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 100%;
	flex: 1;
	overflow: hidden;
	margin-top: 2px;
	line-height: 1.2; /* mse am 19.07.2026 von 1.2 geändert auf 1.8 */
}

.tcn-v6_4-slot-name {
	font-weight: 600; 
	font-size: 1.0rem; /* mse am 19.07.2026 von 0.72em geändert auf 1.2em */
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 100%;
	word-break: break-word;
}

.tcn-v6_4-slot-partner-name {
	font-weight: 400;
	color: #4b5563;
	font-size: 1.2em; /* relativ zur (ggf. dynamisch skalierten) Basisgröße */ /* mse am 19.07.2026 von 0.94em geändert auf 1.2em */
}

.tcn-v6_4-slot-mine {
	background: #dbeafe;
	color: #1e40af;
	border-color: #93c5fd;
	cursor: pointer;
	font-weight: 600;
}
.tcn-v6_4-slot-mine:hover {
	background: #bfdbfe;
	box-shadow: 0 4px 10px rgba(30, 64, 175, 0.1);
}
.tcn-v6_4-slot-mine .tcn-v6_4-slot-time {
	background: rgba(30, 64, 175, 0.08);
	color: #1e40af;
}

.tcn-v6_4-cancel-hint {
	font-size: 0.65rem;
	margin-top: 2px;
	color: #dc2626;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 2px;
	font-weight: 700;
}

.tcn-v6_4-slot-free {
	background: #ecfdf5;
	color: #065f46;
	border-color: #a7f3d0;
	cursor: pointer;
	font-weight: 600;
}
.tcn-v6_4-slot-free:hover {
	background: #10b981;
	color: #ffffff;
	border-color: #10b981;
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}
.tcn-v6_4-slot-free:hover .tcn-v6_4-slot-time {
	background: rgba(255, 255, 255, 0.25);
	color: #ffffff;
}

/* Spanned (Double Booking) Slots styling */
.tcn-v6_4-slot-span {
	padding: 10px 6px;
	justify-content: flex-start;
}

.tcn-v6_4-slot-span .tcn-v6_4-names-wrap {
	margin-top: 6px;
}

.tcn-v6_4-slot-span .tcn-v6_4-cancel-hint {
	margin-top: auto; /* Push cancel hint to the bottom */
	padding-top: 8px;
}

/* Modals & Forms */
.tcn-v6_4-modal {
	display: none;
	position: fixed;
	z-index: 99999;
	left: 0; top: 0; width: 100%; height: 100%;
	background: rgba(15, 23, 42, 0.6);
	backdrop-filter: blur(4px);
	overflow-y: auto;
}

.tcn-v6_4-modal-content {
	background: #ffffff;
	margin: 8% auto;
	padding: 28px;
	border-radius: 16px;
	max-width: 480px;
	width: 90%;
	position: relative;
	box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
	box-sizing: border-box;
	border: 1px solid #e2e8f0;
	animation: tcn-v6_4-modal-in 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes tcn-v6_4-modal-in {
	from { transform: translateY(15px); opacity: 0; }
	to { transform: translateY(0); opacity: 1; }
}

.tcn-v6_4-close {
	position: absolute;
	right: 20px;
	top: 20px;
	font-size: 28px;
	cursor: pointer;
	color: #94a3b8;
	line-height: 1;
	transition: color 0.2s ease;
}
.tcn-v6_4-close:hover {
	color: #0f172a;
}

.tcn-v6_4-modal h3 {
	margin: 0 0 16px 0;
	font-size: 1.4rem;
	font-weight: 700;
	color: #0f172a;
}

/* Auth Tabs */
.tcn-v6_4-auth-tabs {
	display: flex;
	background: #f1f5f9;
	border-radius: 10px;
	padding: 4px;
	margin-bottom: 20px;
}

.tcn-v6_4-auth-tab {
	flex: 1;
	padding: 10px;
	border: none;
	background: none;
	font-weight: 700;
	cursor: pointer;
	font-size: 0.95rem;
	color: #64748b;
	border-radius: 8px;
	transition: all 0.2s ease;
}
.tcn-v6_4-auth-tab.active {
	background: #ffffff;
	color: #0f172a;
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.tcn-v6_4-auth-form {
	display: none;
}
.tcn-v6_4-auth-form.active {
	display: block;
}

/* Forms Elements */
.tcn-v6_4-form-group {
	margin-bottom: 18px;
	box-sizing: border-box;
}

.tcn-v6_4-form-group-row {
	display: flex;
	gap: 12px;
}
.tcn-v6_4-form-group-row .tcn-v6_4-form-group {
	flex: 1;
}

.tcn-v6_4-form-group label {
	display: block;
	margin-bottom: 6px;
	font-weight: 600;
	font-size: 0.88rem;
	color: #475569;
}

.tcn-v6_4-form-group input,
.tcn-v6_4-form-group select {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #cbd5e1;
	border-radius: 8px;
	box-sizing: border-box;
	font-size: 0.95rem;
	background-color: #f8fafc;
	font-family: inherit;
	color: #0f172a;
	transition: all 0.2s ease;
}

.tcn-v6_4-form-group input:focus,
.tcn-v6_4-form-group select:focus {
	outline: none;
	border-color: #0f172a;
	background-color: #ffffff;
	box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.08);
}

.tcn-v6_4-partner-select {
	margin-bottom: 10px;
}

/* Summary Box inside Modal */
.tcn-v6_4-booking-summary-box {
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	padding: 14px 18px;
	margin-bottom: 20px;
}
.tcn-v6_4-booking-summary-box p {
	margin: 6px 0;
	font-size: 0.92rem;
	color: #475569;
}
.tcn-v6_4-booking-summary-box p strong {
	color: #0f172a;
}

/* Buttons */
.tcn-v6_4-btn {
	width: 100%;
	padding: 12px;
	border: none;
	border-radius: 8px;
	font-weight: 700;
	font-size: 1rem;
	cursor: pointer;
	transition: all 0.2s ease;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	box-sizing: border-box;
}

.tcn-v6_4-btn-primary {
	background: #10b981;
	color: #ffffff;
}
.tcn-v6_4-btn-primary:hover {
	background: #059669;
}
.tcn-v6_4-btn-primary:disabled {
	background: #a7f3d0;
	cursor: not-allowed;
}

.tcn-v6_4-btn-danger {
	background: #ef4444;
	color: #ffffff;
}
.tcn-v6_4-btn-danger:hover {
	background: #dc2626;
}
.tcn-v6_4-btn-danger:disabled {
	background: #fca5a5;
	cursor: not-allowed;
}

/* Notification Banners */
.tcn-v6_4-success {
	background: #ecfdf5;
	color: #065f46;
	padding: 12px 16px;
	border-radius: 8px;
	border-left: 4px solid #10b981;
	font-weight: 500;
	font-size: 0.9rem;
	margin-bottom: 18px;
}

.tcn-v6_4-error {
	background: #fee2e2;
	color: #991b1b;
	padding: 12px 16px;
	border-radius: 8px;
	border-left: 4px solid #ef4444;
	font-weight: 500;
	font-size: 0.9rem;
	margin-bottom: 18px;
}

/* Kalender-Trigger-Button neben dem nativen Datumsfeld */
.tcn-v6_4-date-selector {
	position: relative;
}
.tcn-v6_4-btn-calendar-trigger {
	background: #2F2F2F; /*mse #0f172a changed to #00FF00 */
	color: #ffffff;
	border: none;
	width: 38px;
	height: 38px;
	border-radius: 8px;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: background-color 0.2s ease;
	vertical-align: middle;
}
.tcn-v6_4-btn-calendar-trigger:hover {
	background: #1e293b;
}
.tcn-v6_4-btn-calendar-trigger .dashicons {
	font-size: 20px;
	width: 20px;
	height: 20px;
}

/* Kalender-Popup (Modal) */
.tcn-v6_4-calendar-modal-content {
	max-width: 360px;
	text-align: center;
}

.tcn-v6_4-cal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin: 4px 0 14px;
}
.tcn-v6_4-cal-nav {
	background: #f1f5f9;
	border: 1px solid #cbd5e1;
	border-radius: 8px;
	width: 34px;
	height: 34px;
	cursor: pointer;
	font-size: 16px;
	color: #0f172a;
	transition: background-color 0.2s ease;
}
.tcn-v6_4-cal-nav:hover {
	background: #e2e8f0;
}
.tcn-v6_4-cal-nav:disabled {
	opacity: 0.35;
	cursor: not-allowed;
}
.tcn-v6_4-cal-month-label {
	font-weight: 700;
	font-size: 1.05rem;
	color: #0f172a;
}

.tcn-v6_4-cal-weekdays,
.tcn-v6_4-cal-days {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 4px;
}
.tcn-v6_4-cal-weekdays {
	margin-bottom: 6px;
	font-size: 0.78rem;
	font-weight: 700;
	color: #64748b;
}
.tcn-v6_4-cal-day-cell {
	aspect-ratio: 1 / 1;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 8px;
	font-size: 0.85rem;
	font-weight: 500;
	cursor: pointer;
	background: #f8fafc;
	color: #0f172a;
	transition: background-color 0.15s ease;
}
.tcn-v6_4-cal-day-cell.tcn-v6_4-cal-empty {
	background: transparent;
	cursor: default;
}
.tcn-v6_4-cal-day-cell.tcn-v6_4-cal-disabled {
	opacity: 0.3;
	cursor: not-allowed;
	background: transparent;
}
.tcn-v6_4-cal-day-cell:not(.tcn-v6_4-cal-disabled):not(.tcn-v6_4-cal-empty):hover {
	background: #10b981;
	color: #ffffff;
}
.tcn-v6_4-cal-day-cell.tcn-v6_4-cal-today {
	border: 2px solid #0f172a;
	font-weight: 700;
}
.tcn-v6_4-cal-day-cell.tcn-v6_4-cal-selected {
	background: #0f172a;
	color: #ffffff;
	font-weight: 700;
}

.tcn-v6_4-cal-legend {
	font-size: 0.78rem;
	margin-top: 14px;
	color: #64748b;
}
.tcn-v6_4-cal-dot {
	display: inline-block;
	width: 12px;
	height: 12px;
	border-radius: 3px;
	vertical-align: middle;
	margin-right: 3px;
}
.tcn-v6_4-cal-dot-today {
	border: 2px solid #0f172a;
}
.tcn-v6_4-cal-dot-selected {
	background: #0f172a;
}
