/**
 * Club Events Display - Styles
 */

/* Scoped Enhancements */
.ced-events-list, .ced-events-list * {
	box-sizing: border-box;
}

/* Events List Container */
.ced-events-list {
	display: grid !important;
	grid-template-columns: repeat(4, 1fr) !important;
	gap: 25px !important;
	max-width: 1600px;
	margin: 0 auto;
	padding: 30px 20px;
}

/* Individual Event Card */
.ced-event-card {
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
	overflow: hidden;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
	display: flex;
	flex-direction: column;
	height: 100%;
}

.ced-event-card:hover {
	transform: translateY(-5px);
	box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Event Image Wrapper */
.ced-event-image-wrapper {
	position: relative;
	width: 100%;
	height: 200px;
	overflow: hidden;
	background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
	flex-shrink: 0;
}

.ced-event-image {
	width: 100%;
	height: 100%;
	object-fit: cover !important;
	object-position: center;
	display: block;
	transition: transform 0.3s ease;
}

.ced-event-card:hover .ced-event-image {
	transform: scale(1.05);
}

.ced-event-image-placeholder {
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	flex-shrink: 0;
}

/* Date Badge - Positioned on Image */
.ced-event-date-badge {
	position: absolute;
	top: 15px;
	left: 15px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	background: #fff;
	color: #2c3e50;
	padding: 12px 16px;
	border-radius: 10px;
	text-align: center;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	min-width: 70px;
}

.ced-badge-day {
	font-size: 32px;
	font-weight: 700;
	line-height: 1;
	margin-bottom: 2px;
}

.ced-badge-month {
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: #666;
}

/* Event Content Section */
.ced-event-content {
	padding: 20px;
	display: flex;
	flex-direction: column;
	flex: 1;
}

.ced-event-title {
	margin: 0 0 15px 0;
	font-size: 20px;
	font-weight: 700;
	color: #2c3e50;
	line-height: 1.4;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	/* Standard property for wider compatibility */
	line-clamp: 2;
	overflow: hidden;
	min-height: 56px;
}

/* Event Meta (Date/Time Info) */
.ced-event-meta {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-bottom: 15px;
}

.ced-meta-item {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	font-size: 13px;
	color: #555;
}

.ced-meta-icon {
	font-size: 16px;
	flex-shrink: 0;
	margin-top: 2px;
}

.ced-meta-text {
	color: #666;
	line-height: 1.5;
	flex: 1;
}

/* Event Actions */
.ced-event-actions {
	display: flex;
	gap: 8px;
	margin-top: auto;
	padding-top: 15px;
}

/* Buttons */
.ced-btn {
	display: inline-block;
	padding: 10px 16px;
	border: none;
	border-radius: 6px;
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
	transition: all 0.3s ease;
	text-align: center;
	flex: 1;
	white-space: nowrap;
}

.ced-btn-details {
	background: #111721;
	color: #fff;
	border: 2px solid #111721;
}

.ced-btn-details:hover {
	background: #1a2230;
	border-color: #1a2230;
	color: #fff;
}

.ced-btn-book {
	background: #111721;
	color: #fff;
	border: 2px solid #111721;
}

.ced-btn-book:hover {
	background: #1a2230;
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(17, 23, 33, 0.3);
	color: #fff;
}

.ced-btn-primary {
	background: #111721;
	color: #fff;
	border: 2px solid #111721;
}

.ced-btn-primary:hover {
	background: #1a2230;
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(17, 23, 33, 0.4);
	color: #fff;
}

.ced-btn-large {
	padding: 15px 32px;
	font-size: 16px;
	width: 100%;
	max-width: 400px;
	margin: 20px auto 0;
	display: block;
}

/* Modal Styles */
.ced-modal {
	display: none !important;
	position: fixed !important;
	z-index: 999999 !important;
	left: 0 !important;
	top: 0 !important;
	width: 100% !important;
	height: 100% !important;
	background-color: rgba(0, 0, 0, 0.8) !important;
	align-items: center !important;
	justify-content: center !important;
	padding: 20px !important;
	overflow-y: auto !important;
}

.ced-modal.ced-modal-open {
	display: flex !important;
	animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
	from { opacity: 0; }
	to { opacity: 1; }
}

.ced-modal-content {
	background-color: #fff;
	padding: 40px;
	width: 100%;
	max-width: 800px;
	max-height: 90vh;
	overflow-y: auto;
	border-radius: 12px;
	position: relative;
	margin: auto;
	animation: slideDown 0.3s ease;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

/* Custom Scrollbar for Modal */
.ced-modal-content::-webkit-scrollbar {
	width: 8px;
}

.ced-modal-content::-webkit-scrollbar-track {
	background: #f1f1f1;
	border-radius: 10px;
}

.ced-modal-content::-webkit-scrollbar-thumb {
	background: #667eea;
	border-radius: 10px;
}

.ced-modal-content::-webkit-scrollbar-thumb:hover {
	background: #5568d3;
}

@keyframes slideDown {
	from {
		transform: translateY(-30px) scale(0.95);
		opacity: 0;
	}
	to {
		transform: translateY(0) scale(1);
		opacity: 1;
	}
}

.ced-modal-close {
	position: absolute;
	right: 20px;
	top: 20px;
	font-size: 28px;
	font-weight: 400;
	color: #999;
	cursor: pointer;
	transition: all 0.3s ease;
	line-height: 1;
	width: 36px;
	height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: transparent;
}

.ced-modal-close:hover {
	color: #fff;
	background: #667eea;
	transform: rotate(90deg);
}

.ced-modal-image {
	width: 100%;
	height: auto;
	border-radius: 10px;
	margin-bottom: 25px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.ced-modal-content h2 {
	margin: 0 0 10px 0;
	font-size: 32px;
	color: #2c3e50;
	padding-right: 40px;
}

.ced-modal-club {
	color: #667eea;
	font-size: 16px;
	margin-bottom: 20px;
	font-weight: 600;
}

.ced-modal-datetime {
	background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 10%);
	padding: 20px;
	border-radius: 10px;
	margin: 20px 0;
	border-left: 4px solid #667eea;
}

.ced-modal-datetime p {
	margin: 10px 0;
	font-size: 16px;
	color: #2c3e50;
}

.ced-modal-description {
	margin: 25px 0;
	line-height: 1.8;
	font-size: 16px;
	color: #495057;
}

/* Event Count */
.ced-event-count {
	text-align: center;
	color: #666;
	font-size: 14px;
	margin-top: 40px;
	padding: 16px 24px;
	background: #fff;
	border-radius: 8px;
	border: 1px solid #e0e0e0;
	max-width: 400px;
	margin-left: auto;
	margin-right: auto;
}

/* Error & No Events Messages */
.ced-error {
	padding: 20px 30px;
	background: #fff3cd;
	border-left: 4px solid #ffc107;
	color: #856404;
	border-radius: 6px;
	text-align: center;
	margin: 20px auto;
	max-width: 800px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.ced-no-events {
	padding: 60px 40px;
	text-align: center;
	color: #666;
	font-size: 18px;
	background: #fff;
	border-radius: 12px;
	border: 2px dashed #e0e0e0;
	margin: 40px auto;
	max-width: 600px;
}

/* Responsive Design */
@media (max-width: 1400px) {
	.ced-events-list {
		grid-template-columns: repeat(3, 1fr);
		gap: 20px;
	}
}

@media (max-width: 1024px) {
	.ced-events-list {
		grid-template-columns: repeat(2, 1fr);
		gap: 20px;
	}
}

@media (max-width: 768px) {
	.ced-events-list {
		grid-template-columns: 1fr;
		padding: 20px 15px;
		gap: 20px;
	}

	.ced-event-title {
		min-height: auto;
		font-size: 18px;
	}

	.ced-event-image-wrapper {
		height: 200px;
	}

	.ced-event-content {
		padding: 18px;
	}

	.ced-event-actions {
		flex-direction: column;
	}

	.ced-btn {
		width: 100%;
	}

	.ced-modal {
		padding: 10px !important;
	}

	.ced-modal-content {
		padding: 20px;
		max-height: 90vh;
	}

	.ced-modal-content h2 {
		font-size: 22px;
		padding-right: 35px;
	}

	.ced-modal-datetime {
		padding: 15px;
	}

	.ced-btn-large {
		padding: 12px 24px;
		font-size: 15px;
	}
}

@media (max-width: 576px) {
	.ced-event-image-wrapper {
		height: 180px;
	}

	.ced-badge-day {
		font-size: 24px;
	}

	.ced-badge-month {
		font-size: 10px;
	}

	.ced-event-date-badge {
		min-width: 55px;
		padding: 8px 10px;
	}

	.ced-modal-content {
		padding: 15px;
	}

	.ced-modal-content h2 {
		font-size: 20px;
	}
}

/* Loading State */
.ced-events-list.loading {
	opacity: 0.6;
	pointer-events: none;
}

/* Print Styles */
@media print {
	.ced-modal {
		display: none;
	}

	.ced-event-actions {
		display: none;
	}

	.ced-event-card {
		break-inside: avoid;
		box-shadow: none;
		border: 1px solid #ddd;
	}
}
