/**
 * Facebook Events PRO - Frontend Styles
 * 
 * @package FacebookEventsPro
 * @version 1.0.0
 */

/* ===== RESET & BASE STYLES ===== */
.fbep-events-grid,
.fbep-events-list,
.fbep-events-carousel {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

.fbep-events-grid *,
.fbep-events-list *,
.fbep-events-carousel * {
	box-sizing: border-box;
}

/* ===== GRID LAYOUT ===== */
.fbep-events-grid {
	display: grid;
	gap: 20px;
	margin-bottom: 30px;
}

.fbep-events-grid.fbep-columns-1 {
	grid-template-columns: 1fr;
}
.fbep-events-grid.fbep-columns-2 {
	grid-template-columns: repeat(2, 1fr);
}
.fbep-events-grid.fbep-columns-3 {
	grid-template-columns: repeat(3, 1fr);
}
.fbep-events-grid.fbep-columns-4 {
	grid-template-columns: repeat(4, 1fr);
}
.fbep-events-grid.fbep-columns-5 {
	grid-template-columns: repeat(5, 1fr);
}
.fbep-events-grid.fbep-columns-6 {
	grid-template-columns: repeat(6, 1fr);
}

/* ===== EVENT CARDS ===== */
.fbep-event-card {
	background: #ffffff;
	border: 1px solid #e5e5e5;
	border-radius: 8px;
	overflow: hidden;
	transition: all 0.3s ease;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
	height: fit-content;
}

.fbep-event-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.fbep-event-image {
	position: relative;
	width: 100%;
	height: 200px;
	overflow: hidden;
}

.fbep-event-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.fbep-event-card:hover .fbep-event-image img {
	transform: scale(1.05);
}

.fbep-event-content {
	padding: 20px;
}

.fbep-event-date {
	display: flex;
	flex-direction: column;
	gap: 2px;
	margin-bottom: 12px;
	color: #666;
	font-size: 14px;
	line-height: 1.4;
}

.fbep-date {
	font-weight: 600;
	color: #2563eb;
}

.fbep-time {
	color: #666;
	font-size: 13px;
}

.fbep-event-title {
	margin: 0 0 12px 0;
	font-size: 18px;
	font-weight: 600;
	line-height: 1.3;
	color: #1f2937;
}

.fbep-event-title a {
	color: inherit;
	text-decoration: none;
	transition: color 0.2s ease;
}

.fbep-event-title a:hover {
	color: #2563eb;
}

.fbep-event-location {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-bottom: 12px;
	color: #666;
	font-size: 14px;
}

.fbep-icon-location:before {
	content: '📍';
	font-size: 12px;
}

.fbep-event-description {
	margin-bottom: 15px;
	color: #4b5563;
	font-size: 14px;
	line-height: 1.5;
}

.fbep-event-description p {
	margin: 0;
}

.fbep-event-stats {
	display: flex;
	gap: 15px;
	margin-top: 15px;
	padding-top: 15px;
	border-top: 1px solid #f3f4f6;
	font-size: 13px;
}

.fbep-attending,
.fbep-interested {
	color: #059669;
	font-weight: 500;
}

.fbep-interested {
	color: #dc2626;
}

/* ===== LIST LAYOUT ===== */
.fbep-events-list {
	margin-bottom: 30px;
}

.fbep-event-item {
	display: flex;
	gap: 20px;
	background: #ffffff;
	border: 1px solid #e5e5e5;
	border-radius: 8px;
	padding: 20px;
	margin-bottom: 20px;
	transition: all 0.3s ease;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.fbep-event-item:hover {
	transform: translateY(-1px);
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.fbep-event-date-col {
	flex-shrink: 0;
	width: 120px;
	text-align: center;
	padding: 10px;
	background: #f8fafc;
	border-radius: 6px;
}

.fbep-event-content-col {
	flex: 1;
	min-width: 0;
}

.fbep-events-list .fbep-event-title {
	margin-bottom: 8px;
	font-size: 20px;
}

.fbep-events-list .fbep-event-location {
	margin-bottom: 8px;
}

/* ===== CAROUSEL LAYOUT ===== */
.fbep-events-carousel {
	position: relative;
	margin-bottom: 30px;
}

.fbep-carousel-container {
	position: relative;
	overflow: hidden;
	border-radius: 8px;
}

.fbep-carousel-track {
	display: flex;
	transition: transform 0.3s ease;
	gap: 20px;
}

.fbep-carousel-slide {
	flex: 0 0 300px;
	max-width: 300px;
}

.fbep-carousel-btn {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background: rgba(255, 255, 255, 0.9);
	border: 1px solid #e5e5e5;
	border-radius: 50%;
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: all 0.2s ease;
	font-size: 18px;
	color: #374151;
	z-index: 10;
}

.fbep-carousel-btn:hover {
	background: #ffffff;
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.fbep-carousel-prev {
	left: 10px;
}

.fbep-carousel-next {
	right: 10px;
}

/* ===== NO EVENTS MESSAGE ===== */
.fbep-no-events {
	text-align: center;
	padding: 60px 20px;
	background: #f8fafc;
	border: 2px dashed #d1d5db;
	border-radius: 8px;
	color: #6b7280;
	font-size: 16px;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
	.fbep-events-grid.fbep-columns-3,
	.fbep-events-grid.fbep-columns-4,
	.fbep-events-grid.fbep-columns-5,
	.fbep-events-grid.fbep-columns-6 {
		grid-template-columns: repeat(2, 1fr);
	}

	.fbep-event-item {
		flex-direction: column;
		gap: 15px;
	}

	.fbep-event-date-col {
		width: 100%;
		text-align: left;
	}

	.fbep-carousel-slide {
		flex: 0 0 280px;
		max-width: 280px;
	}
}

@media (max-width: 480px) {
	.fbep-events-grid {
		grid-template-columns: 1fr;
		gap: 15px;
	}

	.fbep-event-content {
		padding: 15px;
	}

	.fbep-event-title {
		font-size: 16px;
	}

	.fbep-carousel-slide {
		flex: 0 0 250px;
		max-width: 250px;
	}

	.fbep-carousel-btn {
		width: 35px;
		height: 35px;
		font-size: 16px;
	}
}

/* ===== ASTRA THEME COMPATIBILITY ===== */
.ast-article-post .fbep-events-grid,
.ast-article-post .fbep-events-list,
.ast-article-post .fbep-events-carousel {
	max-width: none;
}

/* ===== ELEMENTOR COMPATIBILITY ===== */
.elementor-widget-facebook-events-pro .fbep-events-grid,
.elementor-widget-facebook-events-pro .fbep-events-list,
.elementor-widget-facebook-events-pro .fbep-events-carousel {
	margin-bottom: 0;
}

.fbep-elementor-widget {
	width: 100%;
}

/* ===== LOADING STATES ===== */
.fbep-loading {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 40px;
	font-size: 16px;
	color: #6b7280;
}

.fbep-loading:before {
	content: '';
	display: inline-block;
	width: 20px;
	height: 20px;
	border: 2px solid #e5e5e5;
	border-radius: 50%;
	border-top-color: #2563eb;
	animation: fbep-spin 1s linear infinite;
	margin-right: 10px;
}

@keyframes fbep-spin {
	to {
		transform: rotate(360deg);
	}
}

/* ===== ERROR STATES ===== */
.fbep-error {
	padding: 20px;
	background: #fef2f2;
	border: 1px solid #fecaca;
	border-radius: 6px;
	color: #dc2626;
	font-size: 14px;
	text-align: center;
}

/* ===== DARK MODE SUPPORT ===== */
@media (prefers-color-scheme: dark) {
	.fbep-event-card,
	.fbep-event-item {
		background: #1f2937;
		border-color: #374151;
		color: #f3f4f6;
	}

	.fbep-event-title {
		color: #f3f4f6;
	}

	.fbep-event-title a:hover {
		color: #60a5fa;
	}

	.fbep-event-date-col {
		background: #374151;
	}

	.fbep-no-events {
		background: #374151;
		border-color: #4b5563;
		color: #9ca3af;
	}
}
