/* Vendor Event Manager — Frontend Styles */

.vem-wrap {
	width: 100%;
	padding: 0;
	margin: 0;
	font-family: inherit;
	box-sizing: border-box;
}

.vem-wrap *,
.vem-wrap *::before,
.vem-wrap *::after {
	box-sizing: inherit;
}

/* ============================================================
   Event selector row
   ============================================================ */

.vem-selector-row {
	display: flex;
	align-items: center;
	gap: 16px;
	flex-wrap: wrap;
	margin-bottom: 32px;
	padding: 20px 24px;
	background: #f8f9fa;
	border: 1px solid #e2e5e9;
	border-radius: 8px;
}

.vem-select-label {
	font-weight: 700;
	font-size: 1rem;
	white-space: nowrap;
	color: #222;
}

.vem-select {
	flex: 1;
	min-width: 260px;
	padding: 10px 14px;
	font-size: 1rem;
	border: 2px solid #ccc;
	border-radius: 6px;
	background: #fff;
	cursor: pointer;
	transition: border-color 0.15s;
}

.vem-select:focus {
	outline: none;
	border-color: #0073aa;
}

.vem-option-full {
	color: #999;
}

/* ============================================================
   Loading spinner
   ============================================================ */

.vem-loading {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 32px 0;
	color: #666;
	font-style: italic;
	font-size: 1rem;
}

.vem-spinner {
	display: inline-block;
	width: 24px;
	height: 24px;
	border: 3px solid #e0e0e0;
	border-top-color: #0073aa;
	border-radius: 50%;
	animation: vem-spin 0.7s linear infinite;
	flex-shrink: 0;
}

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

/* ============================================================
   Event detail — two-column layout
   ============================================================ */

.vem-event-details {
	animation: vem-fadein 0.25s ease;
}

@keyframes vem-fadein {
	from { opacity: 0; transform: translateY(8px); }
	to   { opacity: 1; transform: translateY(0); }
}

.vem-event-layout {
	display: flex;
	align-items: flex-start;
	gap: 40px;
}

/* ---- Image column ---- */

.vem-event-image-col {
	flex: 0 0 340px;
	max-width: 340px;
}

.vem-event-img {
	display: block;
	width: 100%;
	aspect-ratio: 3 / 4;
	object-fit: cover;
	border-radius: 10px;
	box-shadow: 0 6px 24px rgba(0, 0, 0, 0.14);
}

/* ---- Info column ---- */

.vem-event-info-col {
	flex: 1;
	min-width: 0;
}

/* ============================================================
   Event header / meta / description
   ============================================================ */

.vem-event-header {
	margin-bottom: 20px;
	padding-bottom: 16px;
	border-bottom: 2px solid #e8eaed;
}

.vem-event-title {
	margin: 0 0 8px;
	font-size: 2rem;
	line-height: 1.2;
	color: #111;
}

.vem-event-meta {
	margin: 0;
	font-size: 1rem;
	color: #555;
}

.vem-event-description {
	margin-bottom: 32px;
	font-size: 1rem;
	line-height: 1.75;
	color: #333;
}

/* ============================================================
   Spots section
   ============================================================ */

.vem-spots-section h3 {
	margin: 0 0 16px;
	font-size: 1.2rem;
	font-weight: 700;
	color: #111;
	border-bottom: 2px solid #e8eaed;
	padding-bottom: 10px;
}

.vem-spots-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	gap: 16px;
}

/* ============================================================
   Spot cards
   ============================================================ */

.vem-spot {
	border: 2px solid transparent;
	border-radius: 10px;
	padding: 18px 14px;
	text-align: center;
	transition: border-color 0.15s, box-shadow 0.15s, transform 0.12s;
	user-select: none;
}

.vem-spot__name {
	font-weight: 700;
	font-size: 1rem;
	margin-bottom: 8px;
	line-height: 1.3;
}

.vem-spot__price {
	font-size: 1.15rem;
	font-weight: 600;
	color: #222;
	margin-bottom: 8px;
}

.vem-spot__status,
.vem-spot__action {
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	font-weight: 600;
}

/* Available */
.vem-spot--available {
	background: #f0faf2;
	border-color: #4caf50;
	cursor: pointer;
}

.vem-spot--available .vem-spot__action {
	color: #2e7d32;
}

.vem-spot--available:hover {
	border-color: #2e7d32;
	box-shadow: 0 6px 18px rgba(76, 175, 80, 0.28);
	transform: translateY(-3px);
}

.vem-spot--available:active {
	transform: translateY(0);
	box-shadow: none;
}

/* Adding (transient) */
.vem-spot--adding {
	opacity: 0.55;
	cursor: wait;
	pointer-events: none;
}

/* Reserved */
.vem-spot--reserved {
	background: #f4f4f4;
	border-color: #c8c8c8;
	opacity: 0.5;
	cursor: not-allowed;
}

.vem-spot--reserved .vem-spot__name {
	color: #888;
}

.vem-spot--reserved .vem-spot__status {
	color: #999;
}

/* In cart */
.vem-spot--in-cart {
	background: #fffbea;
	border-color: #f5a623;
	cursor: default;
}

.vem-spot--in-cart .vem-spot__status {
	color: #a06000;
	font-weight: 700;
}

/* ============================================================
   Messages
   ============================================================ */

.vem-messages {
	margin-top: 20px;
}

.vem-message {
	padding: 14px 18px;
	border-radius: 6px;
	margin-bottom: 12px;
	display: flex;
	align-items: flex-start;
	gap: 12px;
	font-size: 0.95rem;
	animation: vem-fadein 0.2s ease;
}

.vem-message--success {
	background: #ecf7ed;
	border: 1px solid #4caf50;
	color: #1b4d1e;
}

.vem-message--error {
	background: #fce4e4;
	border: 1px solid #e53935;
	color: #7d1c1c;
}

.vem-message__close {
	margin-left: auto;
	background: none;
	border: none;
	cursor: pointer;
	font-size: 1.2rem;
	color: inherit;
	opacity: 0.55;
	padding: 0 2px;
	line-height: 1;
	flex-shrink: 0;
}

.vem-message__close:hover {
	opacity: 1;
}

.vem-view-cart-link {
	margin-left: 8px;
	font-weight: 700;
	text-decoration: underline;
}

/* ============================================================
   Responsive — tablet: narrow image column
   ============================================================ */

@media (max-width: 860px) {
	.vem-event-image-col {
		flex: 0 0 260px;
		max-width: 260px;
	}

	.vem-event-layout {
		gap: 28px;
	}

	.vem-event-title {
		font-size: 1.6rem;
	}
}

/* ============================================================
   Responsive — mobile: stack vertically
   ============================================================ */

/* ============================================================
   View Map link
   ============================================================ */

.vem-map-link {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	margin-top: 10px;
	font-size: 0.9rem;
	font-weight: 600;
	color: #0073aa;
	text-decoration: none;
	border: 1px solid #0073aa;
	border-radius: 4px;
	padding: 5px 12px;
	transition: background 0.15s, color 0.15s;
	/* button reset */
	background: transparent;
	cursor: pointer;
	font-family: inherit;
	line-height: inherit;
}

.vem-map-link:hover {
	background: #0073aa;
	color: #fff;
	text-decoration: none;
}

.vem-map-icon {
	flex-shrink: 0;
}

/* ============================================================
   Lightbox
   ============================================================ */

.vem-lightbox {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 999999;
	align-items: center;
	justify-content: center;
}

.vem-lightbox--open {
	display: flex;
}

.vem-lightbox__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.82);
	cursor: pointer;
}

.vem-lightbox__inner {
	position: relative;
	z-index: 1;
	max-width: 92vw;
	max-height: 90vh;
	display: flex;
	flex-direction: column;
	align-items: center;
	animation: vem-lb-in 0.2s ease;
}

@keyframes vem-lb-in {
	from { opacity: 0; transform: scale(0.94); }
	to   { opacity: 1; transform: scale(1); }
}

.vem-lightbox__img {
	display: block;
	max-width: 100%;
	max-height: 85vh;
	width: auto;
	height: auto;
	border-radius: 6px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
	object-fit: contain;
}

.vem-lightbox__close {
	position: absolute;
	top: -40px;
	right: 0;
	background: none;
	border: none;
	color: #fff;
	font-size: 2rem;
	line-height: 1;
	cursor: pointer;
	padding: 4px 8px;
	opacity: 0.8;
	transition: opacity 0.15s;
}

.vem-lightbox__close:hover {
	opacity: 1;
}

/* ============================================================
   Responsive — mobile: stack vertically
   ============================================================ */

@media (max-width: 600px) {
	.vem-event-layout {
		flex-direction: column;
		gap: 24px;
	}

	.vem-event-image-col {
		flex: none;
		max-width: 100%;
		width: 100%;
	}

	.vem-event-img {
		/* Landscape crop on small screens to save vertical space */
		aspect-ratio: 16 / 9;
	}

	.vem-event-title {
		font-size: 1.4rem;
	}

	.vem-spots-grid {
		grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
	}

	.vem-selector-row {
		padding: 14px 16px;
	}
}
