/**
 * MM Events List - Frontend Styles
 * Grid Card Layout
 *
 * @package MMEventsList
 */

/* ============================================
   Slider Wrapper with Navigation
   ============================================ */
.mmel-events-list--grid {
	position: relative;
	padding: 0 60px; /* Space for nav arrows */
}

/* ============================================
   Horizontal Scroll Container (Slider)
   ============================================ */
.mmel-events-grid {
	display: flex;
	gap: 20px;
	margin: 0;
	padding: 0;
	list-style: none;
	overflow-x: auto;
	overflow-y: visible;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	-webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
	
	/* Hide scrollbar */
	scrollbar-width: none; /* Firefox */
	-ms-overflow-style: none; /* IE/Edge */
}

/* Focus state for grid (keyboard navigation) */
.mmel-events-grid:focus {
	outline: 2px solid #8e1d36;
	outline-offset: 4px;
}

.mmel-events-grid:focus:not(:focus-visible) {
	outline: none;
}

/* Navigation Arrows - Circle Buttons */
.mmel-slider-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 10;
	
	/* Circle Button Style */
	width: 35px;
	height: 35px;
	border-radius: 50%;
	background: #8e1d36;
	color: #fff;
	border: none;
	cursor: pointer;
	
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 14px;
	
	transition: all 0.3s ease;
}

.mmel-slider-nav:hover,
.mmel-slider-nav:focus {
	background: #6d1629;
	transform: translateY(-50%) scale(1.05);
}

.mmel-slider-nav:focus {
	outline: 3px solid #8e1d36;
	outline-offset: 2px;
}

.mmel-slider-nav:focus:not(:focus-visible) {
	outline: none;
}

.mmel-slider-nav--prev {
	left: 10px;
}

.mmel-slider-nav--next {
	right: 10px;
}

.mmel-slider-nav.disabled {
	opacity: 0.3;
	cursor: not-allowed;
	pointer-events: none;
}

/* Icon Styling */
.mmel-slider-nav i {
	line-height: 1;
}

/* Hide Webkit Scrollbar */
.mmel-events-grid::-webkit-scrollbar {
	display: none; /* Chrome/Safari/Opera */
}

/* ============================================
   Event Card (Fixed width for horizontal scroll)
   ============================================ */
.mmel-event-card {
	background: #f2f4f6;
	flex: 0 0 calc((100% - 40px) / 3); /* Exactly 3 cards visible (40px = 2 gaps) */
	scroll-snap-align: start;
	overflow: visible;
	transition: transform 0.2s;
	display: flex;
	flex-direction: column;
}

.mmel-event-card:hover {
	transform: translateY(-2px);
}

/* Responsive Card Width */
@media (max-width: 992px) {
	.mmel-event-card {
		flex: 0 0 calc((100% - 20px) / 2); /* Exactly 2 cards visible (20px = 1 gap) */
	}
}

@media (max-width: 576px) {
	.mmel-event-card {
		flex: 0 0 calc((100% - 20px) / 2); /* Exactly 2 cards visible (20px = 1 gap) */
	}
	
	/* Navigation on Mobile - Half over content */
	.mmel-events-list--grid {
		padding: 0; /* No padding - navigation overlaps content */
	}
	
	.mmel-slider-nav {
		width: 30px;
		height: 30px;
		font-size: 12px;
	}
	
	.mmel-slider-nav--prev {
		left: -15px;
	}
	
	.mmel-slider-nav--next {
		right: -15px;
	}
}

/* ============================================
   Date + Time (inline)
   ============================================ */
.mmel-event-card__datetime {
	font-size: 12px;
	font-weight: 600;
	margin-bottom: 6px;
}

/* ============================================
   Card Content
   ============================================ */
.mmel-event-card__content {
	padding: 24px;
	flex: 1;
	display: flex;
	flex-direction: column;
	overflow: visible;
	min-height: 0;
	text-align: left;
}

.mmel-event-card .mmel-event-card__title.h5 {
	margin: 10px 0 0 0;
	line-height: 1.3;
	word-wrap: break-word;
	overflow-wrap: break-word;
	hyphens: auto;
	color: #8e1d36;
}

.mmel-event-card__title a {
	color: inherit;
	text-decoration: none;
	transition: color 0.2s;
	display: inline;
}

.mmel-event-card__title a:hover,
.mmel-event-card__title a:focus {
	color: #6d1629;
	text-decoration: underline;
}

.mmel-event-card__title a:focus {
	outline: 2px solid #8e1d36;
	outline-offset: 2px;
}

.mmel-event-card__title a:focus:not(:focus-visible) {
	outline: none;
}


/* ============================================
   Card Button
   ============================================ */
.mmel-event-card__link {
	margin-top: auto;
	text-align: right;
}

.mmel-event-card__button {
	color: #8e1d36;
	font-size: 14px;
	text-decoration: none;
	transition: opacity 0.2s;
}

.mmel-event-card__button:hover,
.mmel-event-card__button:focus {
	opacity: 0.7;
}

.mmel-event-card__button:focus {
	outline: 2px solid #8e1d36;
	outline-offset: 2px;
	border-radius: 2px;
}

.mmel-event-card__button:focus:not(:focus-visible) {
	outline: none;
}

.mmel-event-card__button i {
	margin-left: 6px;
}

/* ============================================
   Empty State
   ============================================ */
.mmel-events-list__empty {
	text-align: center;
	padding: 40px 20px;
	color: #999;
}

.mmel-events-list__empty p {
	margin: 0;
	font-size: 16px;
}
