/**
 * Webtonia Event Manager – Public Styles (Modern Redesign)
 */

:root {
	--wem-primary: #0073aa;
	--wem-primary-dark: #005c8a;
	--wem-primary-light: rgba(0, 115, 170, 0.08);
	--wem-gradient: linear-gradient(135deg, var(--wem-primary), #00a0d2);
	--wem-success: #22c55e;
	--wem-danger: #ef4444;
	--wem-warning: #f59e0b;
	--wem-text: #1e293b;
	--wem-text-muted: #64748b;
	--wem-border: #e2e8f0;
	--wem-bg: #f8fafc;
	--wem-radius: 12px;
	--wem-radius-sm: 8px;
	--wem-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 4px 12px rgba(0, 0, 0, 0.04);
	--wem-shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.1), 0 2px 8px rgba(0, 0, 0, 0.06);
	--wem-transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Event List ── */
.wem-event-list {
	max-width: 820px;
	margin: 0 auto;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
}

/* ── Event Card ── */
.wem-event-card {
	background: #fff;
	border: 1px solid var(--wem-border);
	border-radius: var(--wem-radius);
	padding: 0;
	margin-bottom: 28px;
	box-shadow: var(--wem-shadow);
	overflow: hidden;
	transition: box-shadow var(--wem-transition);
}

.wem-event-card:hover {
	box-shadow: var(--wem-shadow-lg);
}

.wem-event-header {
	background: var(--wem-header-gradient, var(--wem-gradient));
	padding: 24px 28px;
	color: #fff;
	position: relative;
}

.wem-event-header::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	height: 4px;
	background: linear-gradient(90deg, rgba(255,255,255,0.3), transparent);
}

.wem-event-title {
	margin: 0 0 10px 0;
	font-size: 1.5em;
	font-weight: 700;
	color: #fff;
	letter-spacing: -0.01em;
}

.wem-event-meta {
	display: flex;
	gap: 20px;
	flex-wrap: wrap;
}

.wem-event-meta-item {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 0.92em;
	opacity: 0.92;
}

.wem-icon {
	width: 16px;
	height: 16px;
	flex-shrink: 0;
}

.wem-event-description {
	padding: 20px 28px;
	color: var(--wem-text-muted);
	line-height: 1.65;
	border-bottom: 1px solid var(--wem-border);
}

/* ── Timeslot Cards ── */
.wem-timeslot-list {
	padding: 24px 28px 28px;
}

.wem-timeslot-list h4 {
	margin: 0 0 16px;
	font-size: 0.95em;
	font-weight: 600;
	color: var(--wem-text);
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.wem-timeslot-card {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 16px 20px;
	background: var(--wem-bg);
	border: 1px solid var(--wem-border);
	border-radius: var(--wem-radius-sm);
	margin-bottom: 10px;
	transition: all var(--wem-transition);
}

.wem-timeslot-card:hover {
	border-color: var(--wem-primary);
	background: var(--wem-primary-light);
	transform: translateY(-1px);
	box-shadow: 0 2px 8px rgba(0, 115, 170, 0.08);
}

.wem-timeslot-card--full {
	opacity: 0.55;
	pointer-events: none;
}

.wem-timeslot-card-left {
	display: flex;
	flex-direction: column;
	gap: 4px;
	flex: 1;
	min-width: 0;
}

.wem-timeslot-title {
	font-weight: 700;
	font-size: 1.05em;
	color: var(--wem-primary);
}

.wem-timeslot-time {
	font-weight: 700;
	font-size: 1.08em;
	color: var(--wem-text);
}

.wem-timeslot-description {
	font-size: 0.85em;
	color: var(--wem-text-muted);
	line-height: 1.45;
}

.wem-timeslot-capacity {
	font-size: 0.85em;
	color: var(--wem-text-muted);
}

.wem-timeslot-price {
	font-size: 0.82em;
	color: var(--wem-primary);
	font-weight: 600;
}

.wem-timeslot-progress {
	width: 100%;
	max-width: 200px;
	height: 4px;
	background: var(--wem-border);
	border-radius: 2px;
	overflow: hidden;
	margin: 2px 0;
}

.wem-timeslot-progress-bar {
	height: 100%;
	background: var(--wem-gradient);
	border-radius: 2px;
	transition: width 0.5s ease;
}

.wem-timeslot-available {
	font-size: 0.82em;
	color: var(--wem-success);
	font-weight: 600;
}

.wem-timeslot-card--full .wem-timeslot-available {
	color: var(--wem-danger);
}

/* ── Buttons ── */
.wem-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 10px 28px;
	border: none;
	border-radius: var(--wem-radius-sm);
	font-size: 0.94em;
	font-weight: 600;
	cursor: pointer;
	transition: all var(--wem-transition);
	text-decoration: none;
	line-height: 1.5;
	gap: 8px;
	white-space: nowrap;
}

.wem-btn:active {
	transform: scale(0.97);
}

.wem-event-list .wem-btn-book,
.wem-event-list .wem-btn-primary,
.wem-booking-standalone .wem-btn-primary,
.wem-modal .wem-btn-primary,
.wem-upload-page .wem-btn-primary,
.wem-btn-book,
.wem-btn-primary {
	background: var(--wem-gradient);
	color: #fff !important;
	box-shadow: 0 2px 8px rgba(0, 115, 170, 0.25);
}

.wem-event-list .wem-btn-book:hover,
.wem-event-list .wem-btn-primary:hover,
.wem-booking-standalone .wem-btn-primary:hover,
.wem-modal .wem-btn-primary:hover,
.wem-upload-page .wem-btn-primary:hover,
.wem-btn-book:hover,
.wem-btn-primary:hover {
	box-shadow: 0 4px 16px rgba(0, 115, 170, 0.35);
	transform: translateY(-1px);
	color: #fff !important;
}

.wem-btn-full {
	width: 100%;
	padding: 14px 28px;
	font-size: 1.02em;
}

.wem-btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
	transform: none;
	box-shadow: none;
}

/* ── Modal ── */
.wem-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
}

.wem-modal-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(15, 23, 42, 0.55);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
}

.wem-modal-content {
	position: relative;
	background: #fff;
	border-radius: var(--wem-radius);
	padding: 36px 32px 32px;
	max-width: 540px;
	width: 92%;
	max-height: 90vh;
	overflow-y: auto;
	box-shadow: var(--wem-shadow-lg);
	animation: wemSlideUp 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes wemSlideUp {
	from { opacity: 0; transform: translateY(24px) scale(0.97); }
	to { opacity: 1; transform: translateY(0) scale(1); }
}

.wem-modal-close {
	position: absolute;
	top: 16px;
	right: 16px;
	background: var(--wem-bg);
	border: none;
	font-size: 22px;
	cursor: pointer;
	color: var(--wem-text-muted);
	line-height: 1;
	padding: 4px 8px;
	border-radius: 6px;
	transition: all var(--wem-transition);
}

.wem-modal-close:hover {
	background: #fee2e2;
	color: var(--wem-danger);
}

.wem-modal-content h3 {
	margin: 0 0 24px;
	color: var(--wem-text);
	font-size: 1.35em;
	font-weight: 700;
}

/* ── Form Sections ── */
.wem-form-section {
	background: var(--wem-bg);
	border: 1px solid var(--wem-border);
	border-radius: var(--wem-radius-sm);
	padding: 20px;
	margin-bottom: 20px;
}

.wem-form-section-title {
	font-size: 0.8em;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--wem-text-muted);
	margin-bottom: 16px;
}

.wem-field-row {
	display: flex;
	gap: 12px;
}

.wem-field--half {
	flex: 1;
}

.wem-field--third {
	flex: 0 0 110px;
}

.wem-field--twothirds {
	flex: 1;
}

/* ── Forms (public) ── */
.wem-form .wem-field {
	margin-bottom: 16px;
}

.wem-form .wem-field:last-child {
	margin-bottom: 0;
}

.wem-form .wem-field label {
	display: block;
	font-weight: 600;
	margin-bottom: 6px;
	font-size: 0.88em;
	color: var(--wem-text);
}

.wem-form .wem-field input[type="text"],
.wem-form .wem-field input[type="email"],
.wem-form .wem-field input[type="tel"],
.wem-form .wem-field select,
.wem-form .wem-field textarea {
	width: 100%;
	padding: 10px 14px;
	border: 1px solid var(--wem-border);
	border-radius: 8px;
	font-size: 0.95em;
	transition: all var(--wem-transition);
	box-sizing: border-box;
	background: #fff;
	color: var(--wem-text);
}

.wem-form .wem-field input:focus,
.wem-form .wem-field select:focus,
.wem-form .wem-field textarea:focus {
	border-color: var(--wem-primary);
	outline: none;
	box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.12);
}

.wem-form-message {
	display: block;
	margin-top: 14px;
	font-size: 0.93em;
	text-align: center;
	padding: 8px;
	border-radius: 6px;
}

.wem-form-message.success {
	color: #166534;
	background: #dcfce7;
}

.wem-form-message.error {
	color: #991b1b;
	background: #fee2e2;
}

.wem-error {
	color: var(--wem-danger);
	font-style: italic;
}

.wem-no-events {
	text-align: center;
	padding: 48px 20px;
	color: var(--wem-text-muted);
	font-size: 1.05em;
}

/* ── File Drop Zone ── */
.wem-file-drop {
	position: relative;
	border: 2px dashed var(--wem-border);
	border-radius: var(--wem-radius-sm);
	padding: 24px 16px;
	text-align: center;
	cursor: pointer;
	transition: all var(--wem-transition);
	background: #fff;
}

.wem-file-drop:hover,
.wem-file-drop.wem-file-drop--dragover {
	border-color: var(--wem-primary);
	background: var(--wem-primary-light);
}

.wem-file-input {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	opacity: 0;
	cursor: pointer;
	z-index: 2;
}

.wem-file-drop-content {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	pointer-events: none;
}

.wem-file-drop-icon {
	width: 36px;
	height: 36px;
	color: var(--wem-text-muted);
	margin-bottom: 4px;
}

.wem-file-drop-text {
	font-weight: 600;
	font-size: 0.92em;
	color: var(--wem-text);
}

.wem-file-drop-hint {
	font-size: 0.78em;
	color: var(--wem-text-muted);
}

.wem-file-preview {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 14px;
	background: var(--wem-bg);
	border-radius: 6px;
	position: relative;
	z-index: 3;
}

.wem-file-preview-name {
	font-weight: 600;
	font-size: 0.9em;
	color: var(--wem-text);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	flex: 1;
}

.wem-file-preview-size {
	font-size: 0.8em;
	color: var(--wem-text-muted);
	white-space: nowrap;
}

.wem-file-preview-remove {
	background: #fee2e2;
	border: none;
	color: var(--wem-danger);
	width: 24px;
	height: 24px;
	border-radius: 50%;
	cursor: pointer;
	font-size: 16px;
	line-height: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	transition: background var(--wem-transition);
}

.wem-file-preview-remove:hover {
	background: #fca5a5;
}

/* ── Star Rating ── */
.wem-star-rating {
	display: flex;
	flex-direction: row-reverse;
	justify-content: flex-end;
	gap: 4px;
}

.wem-star-rating input {
	display: none;
}

.wem-star-rating label {
	font-size: 32px;
	color: #ddd;
	cursor: pointer;
	transition: color 0.15s;
}

.wem-star-rating input:checked ~ label,
.wem-star-rating label:hover,
.wem-star-rating label:hover ~ label {
	color: #f59e0b;
}

/* ── Reviews Display (approved feedback) ── */
.wem-reviews {
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	max-width: 820px;
	margin: 0 auto;
}

.wem-no-reviews {
	text-align: center;
	padding: 32px 20px;
	color: var(--wem-text-muted);
	font-size: 0.95em;
}

.wem-reviews-summary {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin-bottom: 32px;
}

.wem-reviews-summary .wem-star-display {
	font-size: 2.5rem;
	color: #ddd;
}

.wem-reviews-summary .wem-star-display--active {
	color: #f59e0b;
}

.wem-reviews-summary-number {
	font-size: 2.25rem;
	font-weight: 700;
	color: var(--wem-primary);
	margin-left: 8px;
}

.wem-star-display {
	font-size: 20px;
	color: #ddd;
}

.wem-star-display--active {
	color: #f59e0b;
}

.wem-reviews-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 16px;
}

.wem-reviews-card {
	background: #fff;
	border: 1px solid var(--wem-border);
	border-radius: var(--wem-radius-sm);
	padding: 16px 20px;
	box-shadow: var(--wem-shadow);
}

.wem-reviews-card-header {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 10px;
}

.wem-reviews-avatar {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	font-weight: 700;
	font-size: 0.85em;
	flex-shrink: 0;
}

.wem-reviews-card-meta {
	flex: 1;
}

.wem-reviews-card-meta strong {
	font-size: 0.95em;
	color: var(--wem-text);
}

.wem-reviews-card-date {
	font-size: 0.8em;
	color: var(--wem-text-muted);
}

.wem-reviews-card-stars {
	display: flex;
	gap: 2px;
	margin-bottom: 10px;
}

.wem-reviews-card-stars .wem-star-display {
	font-size: 16px;
}

.wem-reviews-card-comment {
	font-size: 0.92em;
	line-height: 1.55;
	color: var(--wem-text-muted);
}

/* Slider-spezifische Styles entfernt – Anzeige wieder als Grid */

/* ── Feedback ── */
.wem-feedback-thanks {
	text-align: center;
	padding: 48px 20px;
	font-size: 1.05em;
	color: var(--wem-success);
}

/* ── File input note ── */
.wem-field-note {
	font-size: 0.8em;
	color: var(--wem-text-muted);
	margin: 4px 0 0;
}

/* ── Document Upload Page ── */
.wem-upload-page {
	max-width: 600px;
	margin: 0 auto;
	padding: 24px;
}

.wem-upload-page h2 {
	color: var(--wem-primary);
}

.wem-notice {
	padding: 14px 18px;
	border-radius: var(--wem-radius-sm);
	margin-bottom: 16px;
	font-size: 0.93em;
}

.wem-notice--success {
	background: #dcfce7;
	color: #166534;
	border: 1px solid #bbf7d0;
}

/* ── Responsive ── */
@media (max-width: 600px) {
	.wem-timeslot-card {
		flex-direction: column;
		align-items: stretch;
		gap: 12px;
	}

	.wem-timeslot-card .wem-btn-book {
		width: 100%;
	}

	.wem-modal-content {
		width: 100%;
		max-width: 100%;
		min-height: 100vh;
		border-radius: 0;
		padding: 24px 20px;
	}

	.wem-event-header {
		padding: 20px;
	}

	.wem-timeslot-list {
		padding: 20px;
	}

	.wem-field-row {
		flex-direction: column;
		gap: 0;
	}

	.wem-field--third,
	.wem-field--twothirds {
		flex: 1;
	}
}
