/* ==========================================================================
   Toast UI Calendar – Custom Styles
   achtbit. | Bookings
   ========================================================================== */

/* Wrapper */
.achtbit-bookings-calendar-wrap {
	max-width: 1200px;
	margin: 0 auto;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Toolbar */
.achtbit-bookings-calendar-toolbar {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 1rem 0;
	flex-wrap: wrap;
}

.achtbit-bookings-calendar-title {
	font-size: 1.25rem;
	font-weight: 600;
	margin: 0;
	min-width: 180px;
	text-align: center;
}

.achtbit-bookings-calendar-nav {
	background: none;
	border: 1px solid #d1d5db;
	border-radius: 6px;
	padding: 0.375rem 0.75rem;
	font-size: 1.25rem;
	cursor: pointer;
	line-height: 1;
	transition: background-color 0.15s, border-color 0.15s;
}

.achtbit-bookings-calendar-nav:hover {
	background-color: #f3f4f6;
	border-color: #9ca3af;
}

/* Category Filter */
.achtbit-bookings-calendar-filters {
	display: flex;
	gap: 0.25rem;
	flex-wrap: wrap;
}

.achtbit-bookings-calendar-filter-btn {
	background: transparent;
	border: 1px solid #d1d5db;
	border-radius: 6px;
	padding: 0.375rem 0.75rem;
	font-size: 0.875rem;
	cursor: pointer;
	transition: all 0.15s;
	color: inherit;
	white-space: nowrap;
}

.achtbit-bookings-calendar-filter-btn:hover {
	background-color: #f3f4f6;
	border-color: #9ca3af;
}

.achtbit-bookings-calendar-filter-btn.active {
	background: #1d71b8;
	color: #fff;
	border-color: #1d71b8;
}

.achtbit-bookings-calendar-views {
	display: flex;
	gap: 0.25rem;
	margin-left: auto;
}

.achtbit-bookings-calendar-view-btn {
	background: transparent;
	border: 1px solid #d1d5db;
	border-radius: 6px;
	padding: 0.375rem 0.75rem;
	font-size: 0.875rem;
	cursor: pointer;
	transition: all 0.15s;
	color: inherit;
}

.achtbit-bookings-calendar-view-btn.active {
	background: #1d71b8;
	color: #fff;
	border-color: #1d71b8;
}

/* Calendar Body */
.achtbit-bookings-calendar-body {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.5rem;
}

/* Toast UI Calendar Container */
#achtbit-calendar {
	min-height: 600px;
}

/* Transparenter Kalender-Hintergrund */
#achtbit-calendar,
#achtbit-calendar .toastui-calendar-layout,
#achtbit-calendar .toastui-calendar-month,
#achtbit-calendar .toastui-calendar-grid,
#achtbit-calendar .toastui-calendar-panel,
#achtbit-calendar .toastui-calendar-panel-grid-wrapper,
#achtbit-calendar .toastui-calendar-day-names,
#achtbit-calendar .toastui-calendar-day-name-item,
#achtbit-calendar .toastui-calendar-grid-cell,
#achtbit-calendar .toastui-calendar-grid-cell-header,
#achtbit-calendar .toastui-calendar-grid-cell-footer,
#achtbit-calendar .toastui-calendar-weekday-grid,
#achtbit-calendar .toastui-calendar-daygrid-cell {
	background: transparent !important;
	background-color: transparent !important;
}


/* Heutiger Tag: kein blauer Kreis, stattdessen blaue fette Zahl */
#achtbit-calendar .toastui-calendar-grid-cell-date .toastui-calendar-weekday-grid-date-decorator {
	background-color: transparent !important;
	border-radius: 0 !important;
	color: #3b82f6 !important;
	font-weight: 700 !important;
	font-size: 1.35em !important;
	width: auto !important;
	height: auto !important;
	line-height: normal !important;
}

/* Sidebar (Overlay, positioned via JS) */
.achtbit-bookings-calendar-sidebar {
	position: fixed;
	width: 370px;
	max-height: 500px;
	overflow-y: auto;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	padding: 0;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
	z-index: 100000;
}

.achtbit-bookings-sidebar-close {
	position: absolute;
	top: 0.75rem;
	right: 0.75rem;
	background: rgba(0, 0, 0, 0.4);
	border: none;
	font-size: 1.25rem;
	cursor: pointer;
	color: #fff;
	line-height: 1;
	padding: 0.125rem 0.375rem;
	border-radius: 50%;
	z-index: 2;
	transition: background-color 0.15s;
}

.achtbit-bookings-sidebar-close:hover {
	background: rgba(0, 0, 0, 0.6);
}

/* Sidebar Image */
.achtbit-bookings-sidebar-content .sidebar-image {
	width: 100%;
	max-height: 200px;
	overflow: hidden;
	border-radius: 12px 12px 0 0;
}

.achtbit-bookings-sidebar-content .sidebar-image img {
	width: 100%;
	height: 200px;
	object-fit: cover;
	display: block;
}

/* Sidebar Body */
.achtbit-bookings-sidebar-content .sidebar-body {
	padding: 1.25rem 1.5rem;
}

.achtbit-bookings-sidebar-content h3 {
	margin: 0 0 0.5rem;
	font-size: 1.125rem;
	font-weight: 600;
}

.achtbit-bookings-sidebar-content .sidebar-excerpt {
	color: #4b5563;
	margin: 0 0 0.75rem;
	line-height: 1.5;
	font-size: 0.875rem;
}

/* Material Icons */
.achtbit-bookings-sidebar-content .sidebar-icon {
	width: 18px;
	height: 18px;
	fill: currentColor;
	flex-shrink: 0;
	vertical-align: middle;
}

/* Meta Rows */
.achtbit-bookings-sidebar-content .sidebar-meta {
	color: #4b5563;
	margin-bottom: 0.75rem;
	display: flex;
	flex-direction: column;
	gap: 0.375rem;
	font-size: 0.875rem;
}

.achtbit-bookings-sidebar-content .sidebar-meta-row {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.achtbit-bookings-sidebar-content .sidebar-meta-row--spots {
	margin-top: 0.375rem;
}

/* Capacity Bar */
.achtbit-bookings-sidebar-content .sidebar-capacity-bar {
	height: 6px;
	background: #e5e7eb;
	border-radius: 3px;
	overflow: hidden;
	margin-bottom: 1rem;
}

.achtbit-bookings-sidebar-content .sidebar-capacity-bar__fill {
	height: 100%;
	border-radius: 3px;
}

/* Book Button */
.achtbit-bookings-sidebar-content .sidebar-book-btn {
	display: block;
	width: 100%;
	padding: 0.625rem 1rem;
	background: #1d71b8;
	color: #fff;
	border: 2px solid #1d71b8;
	border-radius: 8px;
	font-size: 0.875rem;
	font-weight: 700;
	text-align: center;
	text-decoration: none;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	cursor: pointer;
	transition: background-color 0.15s, border-color 0.15s;
	box-sizing: border-box;
}

.achtbit-bookings-sidebar-content .sidebar-book-btn:hover {
	background: #36a9e1;
	border-color: #36a9e1;
	color: #fff;
}

.achtbit-bookings-sidebar-content .sidebar-book-btn--waitlist {
	background: #f59e0b;
	border-color: #f59e0b;
}

.achtbit-bookings-sidebar-content .sidebar-book-btn--waitlist:hover {
	background: #d97706;
	border-color: #d97706;
}

.achtbit-bookings-sidebar-content .sidebar-book-btn--sold-out {
	background: #94a3b8;
	border-color: #94a3b8;
	cursor: not-allowed;
	pointer-events: none;
}

.achtbit-bookings-sidebar-content .sidebar-waitlist-hint {
	font-size: 0.8125rem;
	color: #92400e;
	margin: 0 0 0.5rem;
	line-height: 1.4;
}

/* Popup Custom Styles */
.achtbit-bookings-popup {
	background: #fff;
	border-radius: 12px;
	padding: 1.25rem 1.5rem;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	max-width: 320px;
	font-size: 0.875rem;
}

.achtbit-bookings-popup h4 {
	margin: 0 0 0.75rem;
	font-size: 1rem;
	font-weight: 600;
}

.achtbit-bookings-popup .popup-excerpt {
	color: #4b5563;
	margin: 0 0 0.75rem;
	line-height: 1.5;
}

.achtbit-bookings-popup .popup-icon {
	width: 18px;
	height: 18px;
	fill: currentColor;
	flex-shrink: 0;
	vertical-align: middle;
}

.achtbit-bookings-popup .popup-meta {
	color: #4b5563;
	margin-bottom: 0.75rem;
	display: flex;
	flex-direction: column;
	gap: 0.375rem;
}

.achtbit-bookings-popup .popup-meta-row {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.achtbit-bookings-popup .popup-meta-row--spots {
	margin-top: 0.375rem;
}

.achtbit-bookings-popup .popup-capacity-bar {
	height: 6px;
	background: #e5e7eb;
	border-radius: 3px;
	overflow: hidden;
	margin-bottom: 1rem;
}

.achtbit-bookings-popup .popup-capacity-bar__fill {
	height: 100%;
	border-radius: 3px;
}

.achtbit-bookings-popup .popup-book-btn {
	display: block;
	width: 100%;
	padding: 0.625rem 1rem;
	background: #1d71b8;
	color: #fff;
	border: 2px solid #1d71b8;
	border-radius: 8px;
	font-size: 0.875rem;
	font-weight: 700;
	text-align: center;
	text-decoration: none;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	cursor: pointer;
	transition: background-color 0.15s, border-color 0.15s;
	box-sizing: border-box;
}

.achtbit-bookings-popup .popup-book-btn:hover {
	background: #36a9e1;
	border-color: #36a9e1;
	color: #fff;
}

.achtbit-bookings-popup .popup-book-btn--waitlist {
	background: #f59e0b;
	border-color: #f59e0b;
}

.achtbit-bookings-popup .popup-book-btn--waitlist:hover {
	background: #d97706;
	border-color: #d97706;
}

.achtbit-bookings-popup .popup-book-btn--sold-out {
	background: #94a3b8;
	border-color: #94a3b8;
	cursor: not-allowed;
	pointer-events: none;
}

.achtbit-bookings-popup .popup-waitlist-hint {
	font-size: 0.8125rem;
	color: #92400e;
	margin: 0 0 0.5rem;
	line-height: 1.4;
}

/* Month-View: Punkt und Titel auf gleicher Höhe, Abstand */
#achtbit-calendar .toastui-calendar-weekday-event-dot {
	top: 5px;
	margin-right: 4px;
}

#achtbit-calendar .toastui-calendar-weekday-event-title {
	display: block;
	margin-left: 14px;
	padding-left: 0;
}

#achtbit-calendar .toastui-calendar-weekday-event-block:first-child {
	margin-top: 4px;
}

/* Eltern-Container: overflow sichtbar für mehrzeilige Events innerhalb einer Zeile,
   aber Event-Wrapper pro Wochenzeile clippen damit nichts in die nächste Zeile überläuft. */
#achtbit-calendar .toastui-calendar-panel-grid-wrapper {
	overflow-y: visible;
}

#achtbit-calendar .toastui-calendar-panel-event-wrapper {
	overflow: hidden;
}

#achtbit-calendar .toastui-calendar-weekday-event-block {
	overflow: visible;
}

/* "Mehr"-Popup (Toast UI see-more) */
.toastui-calendar-see-more-container {
	z-index: 10 !important;
}

.toastui-calendar-see-more {
	background: #fff !important;
	border: 1px solid #e5e7eb !important;
	border-radius: 12px !important;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15) !important;
	padding: 1rem 1.25rem !important;
	min-width: 220px;
	height: auto !important;
	max-height: 400px !important;
	overflow-y: auto;
}

.toastui-calendar-see-more-header {
	display: flex;
	align-items: baseline;
	gap: 0.5rem;
	margin-bottom: 0.75rem;
	padding-bottom: 0.5rem;
	border-bottom: 1px solid #e5e7eb !important;
}

.toastui-calendar-more-title-date {
	font-size: 1rem !important;
	font-weight: 600 !important;
	color: #1a1a1a !important;
}

.toastui-calendar-more-title-day {
	display: none !important;
}

.toastui-calendar-month-more-list {
	padding: 0 !important;
}

.achtbit-see-more-close {
	margin-left: auto;
	background: none;
	border: none;
	font-size: 1.25rem;
	cursor: pointer;
	color: #6b7280;
	line-height: 1;
	padding: 0 0.25rem;
	transition: color 0.15s;
}

.achtbit-see-more-close:hover {
	color: #111827;
}

/* Tag-Button ausblenden (nur Monat, Woche, Heute sichtbar) */
.achtbit-bookings-calendar-view-btn[data-view="day"] {
	display: none;
}

/* Smaller screens: padding + hide view switcher */
@media (max-width: 1300px) {
	.achtbit-bookings-calendar-wrap {
		padding-left: 20px;
		padding-right: 20px;
	}

	.achtbit-bookings-calendar-views {
		display: none;
	}
}

/* ==========================================================================
   Mobile Event List (< 1300px)
   ========================================================================== */

/* Mobile container */
.achtbit-calendar-mobile {
	padding: 0;
}

/* Day Groups */
.achtbit-mobile-day-group {
	margin-bottom: 1.25rem;
}

.achtbit-mobile-day-group:last-child {
	margin-bottom: 0;
}

.achtbit-mobile-day-header {
	display: flex;
	align-items: baseline;
	gap: 0.5rem;
	padding: 0.5rem 0;
	border-bottom: 2px solid #e5e7eb;
	margin-bottom: 0.5rem;
}

.achtbit-mobile-day-group--today .achtbit-mobile-day-header {
	border-bottom-color: #1d71b8;
}

.achtbit-mobile-day-name {
	font-weight: 600;
	font-size: 0.9375rem;
	color: #1a1a1a;
}

.achtbit-mobile-day-date {
	font-size: 0.875rem;
	color: #6b7280;
}

.achtbit-mobile-day-today {
	margin-left: auto;
	font-size: 0.75rem;
	font-weight: 600;
	color: #1d71b8;
	background: #eff6ff;
	padding: 0.125rem 0.5rem;
	border-radius: 9999px;
}

/* Event Cards */
.achtbit-mobile-event-card {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.75rem;
	margin-bottom: 0.375rem;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	text-decoration: none;
	color: inherit;
	transition: border-color 0.15s, box-shadow 0.15s;
}

.achtbit-mobile-event-card:hover {
	border-color: #1d71b8;
	box-shadow: 0 2px 8px rgba(29, 113, 184, 0.1);
}

.achtbit-mobile-event-card--full {
	opacity: 0.7;
}

.achtbit-mobile-event-card:last-child {
	margin-bottom: 0;
}

/* Color indicator bar */
.achtbit-mobile-event-color {
	width: 4px;
	min-height: 40px;
	align-self: stretch;
	border-radius: 2px;
	flex-shrink: 0;
}

/* Event content */
.achtbit-mobile-event-content {
	flex: 1;
	min-width: 0;
}

.achtbit-mobile-event-title {
	font-weight: 600;
	font-size: 0.9375rem;
	line-height: 1.3;
	color: #1a1a1a;
	margin-bottom: 0.25rem;
}

.achtbit-mobile-event-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem 0.75rem;
	font-size: 0.8125rem;
	color: #6b7280;
}

.achtbit-mobile-event-time::before {
	content: '';
	display: inline-block;
	width: 12px;
	height: 12px;
	margin-right: 0.25rem;
	vertical-align: -1px;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3E%3Cpath d='m612-292 56-56-148-148v-184h-80v216l172 172ZM480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Z'/%3E%3C/svg%3E") center/contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3E%3Cpath d='m612-292 56-56-148-148v-184h-80v216l172 172ZM480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Z'/%3E%3C/svg%3E") center/contain no-repeat;
}

.achtbit-mobile-event-location::before {
	content: '';
	display: inline-block;
	width: 12px;
	height: 12px;
	margin-right: 0.25rem;
	vertical-align: -1px;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3E%3Cpath d='M480-186q122-112 181-203.5T720-552q0-109-69.5-178.5T480-800q-101 0-170.5 69.5T240-552q0 71 59 162.5T480-186Zm0 106Q319-217 239.5-334.5T160-552q0-150 96.5-239T480-880q127 0 223.5 89T800-552q0 100-79.5 217.5T480-80Z'/%3E%3C/svg%3E") center/contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3E%3Cpath d='M480-186q122-112 181-203.5T720-552q0-109-69.5-178.5T480-800q-101 0-170.5 69.5T240-552q0 71 59 162.5T480-186Zm0 106Q319-217 239.5-334.5T160-552q0-150 96.5-239T480-880q127 0 223.5 89T800-552q0 100-79.5 217.5T480-80Z'/%3E%3C/svg%3E") center/contain no-repeat;
}

/* Badges */
.achtbit-mobile-event-badge {
	display: inline-block;
	font-size: 0.75rem;
	font-weight: 600;
	padding: 0.125rem 0.5rem;
	border-radius: 9999px;
	margin-top: 0.375rem;
}

.achtbit-mobile-event-badge--full {
	background: #fef2f2;
	color: #dc2626;
}

.achtbit-mobile-event-badge--waitlist {
	background: #fffbeb;
	color: #d97706;
}

/* Spots bar (inline) */
.achtbit-mobile-event-spots {
	margin-top: 0.375rem;
}

.achtbit-mobile-event-spots-text {
	font-size: 0.75rem;
	color: #6b7280;
}

.achtbit-mobile-event-spots-bar {
	height: 4px;
	background: #e5e7eb;
	border-radius: 2px;
	overflow: hidden;
	margin-top: 0.25rem;
	max-width: 120px;
}

.achtbit-mobile-event-spots-fill {
	height: 100%;
	background: #22c55e;
	border-radius: 2px;
}

/* Arrow icon */
.achtbit-mobile-event-arrow {
	flex-shrink: 0;
	color: #9ca3af;
	transition: color 0.15s;
}

.achtbit-mobile-event-card:hover .achtbit-mobile-event-arrow {
	color: #1d71b8;
}

/* Empty State */
.achtbit-mobile-empty {
	text-align: center;
	padding: 3rem 1rem;
	color: #9ca3af;
}

.achtbit-mobile-empty svg {
	margin-bottom: 0.75rem;
}

.achtbit-mobile-empty p {
	font-size: 0.9375rem;
	margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
	.achtbit-bookings-calendar-toolbar {
		justify-content: center;
	}

	.achtbit-bookings-calendar-filters {
		width: 100%;
		justify-content: center;
	}

	.achtbit-bookings-calendar-filter-btn {
		padding: 0.3125rem 0.625rem;
		font-size: 0.8125rem;
	}

	.achtbit-bookings-calendar-views {
		margin-left: 0;
		width: 100%;
		justify-content: center;
	}

	.achtbit-bookings-calendar-sidebar {
		width: 100%;
		max-height: 60vh;
		border-radius: 12px 12px 0 0;
		bottom: 0;
		top: auto !important;
		left: 0 !important;
	}

	#achtbit-calendar {
		min-height: 400px;
	}

	.achtbit-mobile-event-card {
		padding: 0.625rem;
	}

	.achtbit-mobile-event-title {
		font-size: 0.875rem;
	}
}
