/**
 * Events Display Styles - Modern Card Design
 *
 * @package EventsAndTicketsForWooCommerce
 * @since 1.0.0
 */

/* Variables */
:root {
	--emwc-primary: #d1410c;
	--emwc-primary-dark: #a63009;
	--emwc-secondary: #3659e3;
	--emwc-text: #1e0a3c;
	--emwc-text-light: #6f7287;
	--emwc-border: #dbdae3;
	--emwc-bg: #f8f7fa;
	--emwc-white: #ffffff;
	--emwc-radius: 8px;
	--emwc-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
	--emwc-shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* Events Container */
.emwc-events {
	--emwc-columns: 3;
	font-family: 'Neue Plak', -apple-system, BlinkMacSystemFont, 'Roboto', 'Helvetica Neue', Helvetica, sans-serif;
}

/* Grid Layout */
.emwc-events-grid {
	display: grid;
	grid-template-columns: repeat(var(--emwc-columns), 1fr);
	gap: 30px;
}

.emwc-events-grid .emwc-event-card {
	background: var(--emwc-white);
	border-radius: var(--emwc-radius);
	overflow: hidden;
	box-shadow: var(--emwc-shadow);
	transition: all 0.3s ease;
	display: flex;
	flex-direction: column;
}

.emwc-events-grid .emwc-event-card:hover {
	transform: translateY(-4px);
	box-shadow: var(--emwc-shadow-lg);
}

.emwc-events-grid .emwc-event-image {
	position: relative;
	aspect-ratio: 16 / 9;
	overflow: hidden;
}

.emwc-events-grid .emwc-event-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.emwc-events-grid .emwc-event-card:hover .emwc-event-image img {
	transform: scale(1.05);
}

.emwc-events-grid .emwc-event-content {
	padding: 20px;
	display: flex;
	flex-direction: column;
	flex-grow: 1;
}

/* List Layout */
.emwc-events-list {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.emwc-events-list .emwc-event-card {
	display: flex;
	gap: 24px;
	padding: 20px;
	background: var(--emwc-white);
	border: 1px solid var(--emwc-border);
	border-radius: var(--emwc-radius);
	transition: all 0.2s ease;
}

.emwc-events-list .emwc-event-card:hover {
	box-shadow: var(--emwc-shadow);
	border-color: transparent;
}

.emwc-events-list .emwc-event-image {
	flex-shrink: 0;
	width: 200px;
	height: 140px;
	border-radius: var(--emwc-radius);
	overflow: hidden;
}

.emwc-events-list .emwc-event-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.emwc-events-list .emwc-event-content {
	flex: 1;
	display: flex;
	gap: 16px;
}

/* Compact Layout */
.emwc-events-compact {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.emwc-events-compact .emwc-event-card {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 16px;
	background: var(--emwc-white);
	border: 1px solid var(--emwc-border);
	border-radius: var(--emwc-radius);
	transition: all 0.2s ease;
}

.emwc-events-compact .emwc-event-card:hover {
	background: var(--emwc-bg);
}

.emwc-events-compact .emwc-event-image {
	width: 60px;
	height: 60px;
	flex-shrink: 0;
	border-radius: var(--emwc-radius);
	overflow: hidden;
}

.emwc-events-compact .emwc-event-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.emwc-events-compact .emwc-event-content {
	flex: 1;
	display: flex;
	align-items: center;
	gap: 16px;
}

.emwc-events-compact .emwc-event-details {
	flex: 1;
}

.emwc-events-compact .emwc-event-title {
	font-size: 15px;
	margin: 0;
}

.emwc-events-compact .emwc-event-meta {
	font-size: 13px;
}

/* Event Date Box */
.emwc-event-date {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-width: 55px;
	padding: 12px;
	background: var(--emwc-primary);
	color: var(--emwc-white);
	border-radius: var(--emwc-radius);
	text-align: center;
	flex-shrink: 0;
}

.emwc-date-month {
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 1px;
	opacity: 0.9;
}

.emwc-date-day {
	font-size: 24px;
	font-weight: 700;
	line-height: 1;
}

/* Event Details */
.emwc-event-details {
	flex: 1;
}

.emwc-event-title {
	margin: 0 0 10px;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.3;
	color: var(--emwc-text);
}

.emwc-event-title a {
	color: inherit;
	text-decoration: none;
	transition: color 0.2s ease;
}

.emwc-event-title a:hover {
	color: var(--emwc-primary);
}

/* Event Meta */
.emwc-event-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	color: var(--emwc-text-light);
	font-size: 14px;
}

.emwc-meta-time,
.emwc-meta-venue {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.emwc-event-meta .dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
	color: var(--emwc-secondary);
}

/* Event Excerpt */
.emwc-event-excerpt {
	margin-top: 12px;
	color: var(--emwc-text-light);
	font-size: 14px;
	line-height: 1.6;
}

.emwc-event-excerpt p {
	margin: 0;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* Single Event Shortcode */
.emwc-single-event {
	max-width: 800px;
	margin: 0 auto;
}

.emwc-event-featured-image {
	margin-bottom: 25px;
	border-radius: var(--emwc-radius);
	overflow: hidden;
}

.emwc-event-featured-image img {
	width: 100%;
	height: auto;
	display: block;
}

.emwc-single-event .emwc-event-title {
	font-size: 32px;
	margin: 0 0 20px;
}

.emwc-event-meta-box {
	background: var(--emwc-bg);
	padding: 24px;
	border-radius: var(--emwc-radius);
	margin-bottom: 25px;
}

.emwc-meta-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 0;
	border-bottom: 1px solid var(--emwc-border);
}

.emwc-meta-item:last-child {
	border-bottom: none;
}

.emwc-meta-item .dashicons {
	color: var(--emwc-secondary);
	font-size: 20px;
	width: 20px;
	height: 20px;
}

.emwc-meta-label {
	font-weight: 600;
	min-width: 80px;
	color: var(--emwc-text);
}

.emwc-meta-value {
	color: var(--emwc-text-light);
}

.emwc-event-content {
	line-height: 1.8;
}

.emwc-event-link {
	margin-top: 25px;
}

.emwc-event-link .button {
	display: inline-block;
	padding: 14px 28px;
	background: var(--emwc-primary);
	color: var(--emwc-white);
	border: none;
	border-radius: var(--emwc-radius);
	font-size: 15px;
	font-weight: 600;
	text-decoration: none;
	transition: all 0.2s ease;
}

.emwc-event-link .button:hover {
	background: var(--emwc-primary-dark);
	color: var(--emwc-white);
}

/* Upcoming Events Widget/Shortcode */
.emwc-upcoming-events {
	font-family: 'Neue Plak', -apple-system, BlinkMacSystemFont, 'Roboto', sans-serif;
}

.emwc-upcoming-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.emwc-upcoming-item {
	display: flex;
	align-items: flex-start;
	gap: 16px;
	padding: 16px 0;
	border-bottom: 1px solid var(--emwc-border);
}

.emwc-upcoming-item:last-child {
	border-bottom: none;
}

.emwc-upcoming-date {
	background: var(--emwc-primary);
	color: var(--emwc-white);
	padding: 8px 12px;
	border-radius: var(--emwc-radius);
	font-size: 13px;
	font-weight: 700;
	white-space: nowrap;
}

.emwc-upcoming-info {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.emwc-upcoming-title {
	color: var(--emwc-text);
	text-decoration: none;
	font-weight: 600;
	font-size: 15px;
	transition: color 0.2s ease;
}

.emwc-upcoming-title:hover {
	color: var(--emwc-primary);
}

.emwc-upcoming-venue {
	font-size: 13px;
	color: var(--emwc-text-light);
}

/* No Events */
.emwc-no-events {
	text-align: center;
	padding: 40px 20px;
	color: var(--emwc-text-light);
	background: var(--emwc-bg);
	border-radius: var(--emwc-radius);
}

/* Error Message */
.emwc-error {
	background: #fef2f2;
	border: 1px solid #fecaca;
	color: #dc2626;
	padding: 16px;
	border-radius: var(--emwc-radius);
}

/* Responsive */
@media (max-width: 992px) {
	.emwc-events-grid {
		--emwc-columns: 2;
	}
}

@media (max-width: 768px) {
	.emwc-events-list .emwc-event-card {
		flex-direction: column;
	}

	.emwc-events-list .emwc-event-image {
		width: 100%;
		height: 180px;
	}

	.emwc-events-grid {
		--emwc-columns: 1;
	}

	.emwc-single-event .emwc-event-title {
		font-size: 24px;
	}

	.emwc-event-meta-box {
		padding: 16px;
	}

	.emwc-meta-item {
		flex-direction: column;
		align-items: flex-start;
		gap: 6px;
	}
}

@media (max-width: 480px) {
	.emwc-events-compact .emwc-event-content {
		flex-direction: column;
		align-items: flex-start;
	}

	.emwc-events-compact .emwc-event-date {
		flex-direction: row;
		gap: 6px;
		padding: 8px 12px;
	}
}
