/**
 * FullCalendar Filter – Styles
 *
 * BEM block: achtbit-fc-filter
 * Layout: Zentrierter 1200px Container, Filter links + Kalender rechts, weißer Hintergrund
 *
 * @package achtbit-bookings
 */

/* ── Layout: Seitenbreit, weißer Hintergrund, flat ──── */
.achtbit-fc-filter {
	width: 100vw;
	position: relative;
	left: 50%;
	transform: translateX(-50%);
	padding: 2rem 1rem;
	font-family: system-ui, -apple-system, sans-serif;
	color: #1a1a1a;
	line-height: 1.6;
	background: #fff;
	box-sizing: border-box;
}

.achtbit-fc-filter__layout {
	max-width: 1400px;
	margin: 0 auto;
	display: flex !important;
	flex-direction: row !important;
	gap: 2rem;
	align-items: flex-start;
}

/* ── Sidebar (left, filter) ─────────────────────────── */
.achtbit-fc-filter__sidebar {
	width: 200px;
	flex-shrink: 0;
	background: transparent;
	border: none;
	border-radius: 0;
	padding: 0;
	display: flex !important;
	flex-direction: column;
}

.achtbit-fc-filter__sidebar-title {
	font-size: 1rem;
	margin-top: 0 !important;
	margin-bottom: 0;
	color: #1a1a1a !important;
	font-weight: 700;
	padding: 0;
}

.achtbit-fc-filter__sidebar-divider {
	border: none;
	border-top: 1px solid #e5e7eb;
	margin: 0.75rem 0;
}

/* ── Filter Groups ──────────────────────────────────── */
.achtbit-fc-filter__group {
	padding: 0;
	margin-bottom: 1.25rem;
}

.achtbit-fc-filter__group-title {
	display: block;
	font-size: 1.125rem !important;
	font-weight: 600 !important;
	color: #1a1a1a !important;
	text-transform: uppercase !important;
	letter-spacing: 0.5px !important;
	margin: 0 0 0.75rem 0 !important;
	padding: 0 !important;
	line-height: 1.4 !important;
}

/* Theme override */
.content .achtbit-fc-filter__sidebar h2,
.content .achtbit-fc-filter__sidebar .achtbit-fc-filter__sidebar-title {
	color: #1a1a1a !important;
}

.achtbit-fc-filter__options {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem;
}

.achtbit-fc-filter__option {
	background: #f3f4f6;
	border: 1px solid #e5e7eb;
	border-radius: 6px;
	padding: 0.25rem 0.625rem;
	font-size: 0.9375rem;
	cursor: pointer;
	transition: all 0.15s;
	color: #374151;
	white-space: nowrap;
}

.achtbit-fc-filter__option:hover {
	background: #e5e7eb;
	border-color: #d1d5db;
}

.achtbit-fc-filter__option.active {
	background: #1d71b8;
	color: #fff;
	border-color: #1d71b8;
	font-weight: 600;
}

/* ── Reset Button ───────────────────────────────────── */
.achtbit-fc-filter__reset-wrap {
	padding: 0;
	margin-top: 0.5rem;
}

.achtbit-fc-filter__reset {
	display: inline-flex;
	align-items: center;
	gap: 0.375rem;
	background: none;
	border: 1px solid #d1d5db;
	border-radius: 6px;
	padding: 0.375rem 0.625rem;
	font-size: 0.8125rem;
	color: #6b7280;
	cursor: pointer;
	transition: all 0.15s;
}

.achtbit-fc-filter__reset:hover {
	background: #f3f4f6;
	color: #1a1a1a;
	border-color: #9ca3af;
}

/* ── Main (right, calendar) ─────────────────────────── */
.achtbit-fc-filter__main {
	flex: 1;
	background: transparent;
	padding: 0;
	display: flex;
	flex-direction: column;
	position: relative;
	z-index: 1;
	min-width: 0;
}

/* ── FullCalendar Overrides ─────────────────────────── */
#achtbit-fullcalendar-filter {
	flex: 1;
}

/* Transparent backgrounds */
#achtbit-fullcalendar-filter .fc,
#achtbit-fullcalendar-filter .fc-scrollgrid,
#achtbit-fullcalendar-filter .fc-theme-standard td,
#achtbit-fullcalendar-filter .fc-theme-standard th,
#achtbit-fullcalendar-filter .fc-theme-standard .fc-scrollgrid {
	border-color: #e5e7eb;
}

#achtbit-fullcalendar-filter .fc {
	font-family: system-ui, -apple-system, sans-serif;
	font-size: 0.875rem;
}

/* Toolbar */
#achtbit-fullcalendar-filter .fc-toolbar {
	margin-bottom: 1rem !important;
	flex-wrap: wrap;
	gap: 0.5rem;
}

#achtbit-fullcalendar-filter .fc-toolbar-title {
	font-size: 1.5rem !important;
	font-weight: 600;
}

#achtbit-fullcalendar-filter .fc-button {
	background: transparent !important;
	border: 1px solid #d1d5db !important;
	border-radius: 6px !important;
	padding: 0.375rem 0.75rem !important;
	font-size: 0.875rem !important;
	color: #1a1a1a !important;
	font-weight: 400 !important;
	text-transform: none !important;
	box-shadow: none !important;
	transition: background-color 0.15s, border-color 0.15s;
}

#achtbit-fullcalendar-filter .fc-button:hover {
	background-color: #f3f4f6 !important;
	border-color: #9ca3af !important;
}

#achtbit-fullcalendar-filter .fc-button-active,
#achtbit-fullcalendar-filter .fc-button.fc-button-active {
	background: #1d71b8 !important;
	color: #fff !important;
	border-color: #1d71b8 !important;
}

#achtbit-fullcalendar-filter .fc-button:disabled {
	opacity: 0.5;
}

/* Prev/Next arrows */
#achtbit-fullcalendar-filter .fc-prev-button,
#achtbit-fullcalendar-filter .fc-next-button {
	padding: 0.375rem 0.5rem !important;
}

/* Day headers */
#achtbit-fullcalendar-filter .fc-col-header-cell {
	padding: 0.5rem 0;
	font-weight: 600;
	font-size: 0.8125rem;
	text-transform: uppercase;
	letter-spacing: 0.3px;
	color: #6b7280;
	background: transparent;
}

#achtbit-fullcalendar-filter .fc-col-header-cell-cushion {
	color: #6b7280;
	text-decoration: none;
}

/* Day cells */
#achtbit-fullcalendar-filter .fc-daygrid-day {
	background: transparent;
}

#achtbit-fullcalendar-filter .fc-daygrid-day-frame {
	min-height: 140px !important;
}

#achtbit-fullcalendar-filter .fc-daygrid-day-number {
	font-size: 0.875rem;
	color: #374151;
	padding: 4px 8px;
	text-decoration: none;
}

#achtbit-fullcalendar-filter .fc-day-today {
	background: rgba(59, 130, 246, 0.04) !important;
}

#achtbit-fullcalendar-filter .fc-day-today .fc-daygrid-day-number {
	color: #3b82f6;
	font-weight: 700;
	font-size: 1rem;
}

#achtbit-fullcalendar-filter .fc-day-other .fc-daygrid-day-number {
	color: #d1d5db;
}

/* Events in month view */
#achtbit-fullcalendar-filter .fc-daygrid-event {
	border-radius: 4px;
	padding: 1px 4px;
	font-size: 0.8125rem;
	line-height: 1.4;
	border: none;
	cursor: pointer;
	margin-bottom: 1px;
}

#achtbit-fullcalendar-filter .fc-daygrid-event .fc-event-title {
	font-weight: 500;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

#achtbit-fullcalendar-filter .fc-daygrid-event .fc-event-time {
	font-weight: 600;
	font-size: 0.75rem;
}

/* More events link */
#achtbit-fullcalendar-filter .fc-daygrid-more-link {
	color: #1d71b8;
	font-size: 0.8125rem;
	font-weight: 600;
	margin-top: 2px;
}

#achtbit-fullcalendar-filter .fc-daygrid-more-link:hover {
	color: #36a9e1;
}

/* Popover for "+N more" */
#achtbit-fullcalendar-filter .fc-popover {
	border-radius: 12px;
	border: 1px solid #e5e7eb;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
	z-index: 10 !important;
}

#achtbit-fullcalendar-filter .fc-popover-header {
	background: #f9fafb;
	border-radius: 12px 12px 0 0;
	padding: 0.75rem 1rem;
	font-weight: 600;
	font-size: 0.9375rem;
}

#achtbit-fullcalendar-filter .fc-popover-body {
	padding: 0.5rem;
}

/* Week view: time grid */
#achtbit-fullcalendar-filter .fc-timegrid-event {
	border-radius: 4px;
	border: none;
	padding: 2px 4px;
}

#achtbit-fullcalendar-filter .fc-timegrid-slot-label {
	font-size: 0.75rem;
	color: #9ca3af;
}

#achtbit-fullcalendar-filter .fc-timegrid-now-indicator-line {
	border-color: #ef4444;
}

/* ── Event Detail Popup ─────────────────────────────── */
.achtbit-fcf-popup {
	width: 320px;
	max-width: calc(100vw - 32px);
	box-sizing: border-box;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	padding: 1.25rem 1.5rem;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.achtbit-fcf-popup__close {
	position: absolute;
	top: 0.5rem;
	right: 0.75rem;
	background: none;
	border: none;
	font-size: 1.25rem;
	cursor: pointer;
	color: #9ca3af;
	line-height: 1;
	padding: 0.125rem 0.375rem;
	transition: color 0.15s;
}

.achtbit-fcf-popup__close:hover {
	color: #1a1a1a;
}

.achtbit-fcf-popup__title {
	margin: 0 0 0.5rem;
	font-size: 1.0625rem;
	font-weight: 600;
	line-height: 1.3;
	padding-right: 1.5rem;
}

.achtbit-fcf-popup__excerpt {
	color: #4b5563;
	margin: 0 0 0.75rem;
	line-height: 1.5;
	font-size: 0.8125rem;
}

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

.achtbit-fcf-popup__meta {
	color: #4b5563;
	margin-bottom: 0.75rem;
	display: flex;
	flex-direction: column;
	gap: 0.375rem;
	font-size: 0.8125rem;
}

.achtbit-fcf-popup__meta-row {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.achtbit-fcf-popup__bar {
	height: 6px;
	background: #e5e7eb;
	border-radius: 3px;
	overflow: hidden;
	margin-bottom: 1rem;
}

.achtbit-fcf-popup__bar-fill {
	height: 100%;
	border-radius: 3px;
}

.achtbit-fcf-popup__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-fcf-popup__btn:hover {
	background: #36a9e1;
	border-color: #36a9e1;
	color: #fff;
}

.achtbit-fcf-popup__btn--waitlist {
	background: #f59e0b;
	border-color: #f59e0b;
}

.achtbit-fcf-popup__btn--waitlist:hover {
	background: #d97706;
	border-color: #d97706;
}

.achtbit-fcf-popup__btn--sold-out {
	background: #94a3b8;
	border-color: #94a3b8;
	cursor: not-allowed;
	pointer-events: none;
}

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

/* ── Event Sidebar (Overlay) ────────────────────────── */
.achtbit-fc-filter__event-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-fc-filter__event-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-fc-filter__event-sidebar-close:hover {
	background: rgba(0, 0, 0, 0.6);
}

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

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

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

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

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

.achtbit-fc-filter__event-sidebar-content .sidebar-icon {
	width: 18px;
	height: 18px;
	fill: currentColor;
	flex-shrink: 0;
	vertical-align: middle;
}

.achtbit-fc-filter__event-sidebar-content .sidebar-meta {
	color: #4b5563;
	margin-bottom: 0.75rem;
	display: flex;
	flex-direction: column;
	gap: 0.375rem;
	font-size: 0.875rem;
}

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

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

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

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

.achtbit-fc-filter__event-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-fc-filter__event-sidebar-content .sidebar-book-btn:hover {
	background: #36a9e1;
	border-color: #36a9e1;
	color: #fff;
}

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

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

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

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

/* ── Mobile List ────────────────────────────────────── */
.achtbit-fcf-mobile { padding: 0; }

.achtbit-fcf-mobile .achtbit-mobile-day-group { margin-bottom: 1.25rem; }
.achtbit-fcf-mobile .achtbit-mobile-day-group:last-child { margin-bottom: 0; }
.achtbit-fcf-mobile .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-fcf-mobile .achtbit-mobile-day-group--today .achtbit-mobile-day-header { border-bottom-color: #1d71b8; }
.achtbit-fcf-mobile .achtbit-mobile-day-name { font-weight: 600; font-size: 0.9375rem; color: #1a1a1a; }
.achtbit-fcf-mobile .achtbit-mobile-day-date { font-size: 0.875rem; color: #6b7280; }
.achtbit-fcf-mobile .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; }
.achtbit-fcf-mobile .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-fcf-mobile .achtbit-mobile-event-card:hover { border-color: #1d71b8; box-shadow: 0 2px 8px rgba(29, 113, 184, 0.1); }
.achtbit-fcf-mobile .achtbit-mobile-event-card--full { opacity: 0.7; }
.achtbit-fcf-mobile .achtbit-mobile-event-color { width: 4px; min-height: 40px; align-self: stretch; border-radius: 2px; flex-shrink: 0; }
.achtbit-fcf-mobile .achtbit-mobile-event-content { flex: 1; min-width: 0; }
.achtbit-fcf-mobile .achtbit-mobile-event-title { font-weight: 600; font-size: 0.9375rem; line-height: 1.3; color: #1a1a1a; margin-bottom: 0.25rem; }
.achtbit-fcf-mobile .achtbit-mobile-event-meta { display: flex; flex-wrap: wrap; gap: 0.25rem 0.75rem; font-size: 0.8125rem; color: #6b7280; }
.achtbit-fcf-mobile .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-fcf-mobile .achtbit-mobile-event-badge--full { background: #fef2f2; color: #dc2626; }
.achtbit-fcf-mobile .achtbit-mobile-event-badge--waitlist { background: #fffbeb; color: #d97706; }
.achtbit-fcf-mobile .achtbit-mobile-event-spots { margin-top: 0.375rem; }
.achtbit-fcf-mobile .achtbit-mobile-event-spots-text { font-size: 0.75rem; color: #6b7280; }
.achtbit-fcf-mobile .achtbit-mobile-event-spots-bar { height: 4px; background: #e5e7eb; border-radius: 2px; overflow: hidden; margin-top: 0.25rem; max-width: 120px; }
.achtbit-fcf-mobile .achtbit-mobile-event-spots-fill { height: 100%; background: #22c55e; border-radius: 2px; }
.achtbit-fcf-mobile .achtbit-mobile-event-arrow { flex-shrink: 0; color: #9ca3af; transition: color 0.15s; }
.achtbit-fcf-mobile .achtbit-mobile-event-card:hover .achtbit-mobile-event-arrow { color: #1d71b8; }
.achtbit-fcf-mobile-empty { text-align: center; padding: 3rem 1rem; color: #9ca3af; }
.achtbit-fcf-mobile-empty svg { margin-bottom: 0.75rem; }
.achtbit-fcf-mobile-empty p { font-size: 0.9375rem; margin: 0; }

/* ── Mobile ─────────────────────────────────────────── */
@media (max-width: 768px) {
	.achtbit-fc-filter { padding: 1rem 0.75rem; }
	.achtbit-fc-filter__layout { flex-direction: column !important; gap: 1rem; }
	.achtbit-fc-filter__sidebar { width: 100% !important; }
	.achtbit-fc-filter__event-sidebar {
		width: 100%;
		max-height: 60vh;
		border-radius: 12px 12px 0 0;
		bottom: 0;
		top: auto !important;
		left: 0 !important;
	}
	.achtbit-fcf-popup {
		width: auto;
		max-width: calc(100vw - 32px);
		box-sizing: border-box;
	}
}
