/* Events Calendar - Frontend Styles */

:root {
	--ec-primary: #1c2e4a;
	--ec-accent: #c8a951;
	--ec-bg: #ffffff;
	--ec-muted: #666666;
	--ec-border: #e2e2e2;
	--ec-today: #fef6e4;
}

.ec-mini-calendar,
.ec-full-view,
.ec-single-event {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	color: #222;
	box-sizing: border-box;
}
.ec-mini-calendar *,
.ec-full-view *,
.ec-single-event * {
	box-sizing: border-box;
}

/* ---------- Mini Calendar ---------- */
.ec-mini-calendar {
	max-width: 420px;
	margin: 0 auto;
	background: var(--ec-bg);
	border: 1px solid var(--ec-border);
	border-radius: 10px;
	padding: 18px;
	box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.ec-cal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 12px;
}
.ec-cal-title {
	margin: 0;
	font-size: 18px;
	font-weight: 700;
	color: var(--ec-primary);
}
.ec-nav-btn {
	background: none;
	border: 1px solid var(--ec-border);
	border-radius: 6px;
	width: 32px;
	height: 32px;
	cursor: pointer;
	font-size: 14px;
	color: var(--ec-primary);
	transition: background 0.15s ease;
}
.ec-nav-btn:hover {
	background: var(--ec-today);
}
.ec-cal-weekdays {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	text-align: center;
	font-size: 12px;
	font-weight: 600;
	color: var(--ec-muted);
	margin-bottom: 6px;
}
.ec-cal-grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 4px;
	min-height: 180px;
}
.ec-cal-loading {
	grid-column: 1 / -1;
	text-align: center;
	color: var(--ec-muted);
	padding: 40px 0;
}
.ec-cal-day {
	position: relative;
	aspect-ratio: 1 / 1;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 13px;
	border-radius: 6px;
	color: #333;
}
.ec-cal-day.ec-empty {
	visibility: hidden;
}
.ec-cal-day.ec-today {
	background: var(--ec-today);
	font-weight: 700;
}
.ec-cal-day.ec-has-event {
	cursor: pointer;
	background: var(--ec-primary);
	color: #fff;
	font-weight: 600;
}
.ec-cal-day.ec-has-event:hover {
	background: var(--ec-accent);
}
.ec-cal-day.ec-has-event::after {
	content: "";
	position: absolute;
	bottom: 4px;
	left: 50%;
	transform: translateX(-50%);
	width: 4px;
	height: 4px;
	border-radius: 50%;
	background: #fff;
}
.ec-cal-footer {
	margin-top: 14px;
	text-align: center;
}
.ec-view-all-link {
	font-size: 13px;
	color: var(--ec-primary);
	font-weight: 600;
	text-decoration: none;
}
.ec-view-all-link:hover {
	text-decoration: underline;
}

/* ---------- Modal ---------- */
.ec-modal-overlay {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(0,0,0,0.55);
	z-index: 9999;
	align-items: center;
	justify-content: center;
	padding: 20px;
}
.ec-modal-overlay.ec-open {
	display: flex;
}
.ec-modal-box {
	background: #fff;
	border-radius: 10px;
	max-width: 500px;
	width: 100%;
	max-height: 85vh;
	overflow-y: auto;
	position: relative;
	padding: 24px;
}
.ec-modal-close {
	position: absolute;
	top: 10px;
	right: 14px;
	background: none;
	border: none;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
	color: #888;
}
.ec-modal-close:hover {
	color: #222;
}
.ec-modal-flyer img {
	width: 100%;
	height: auto;
	border-radius: 8px;
	margin-bottom: 16px;
}
.ec-modal-info h3 {
	margin: 0 0 10px;
	color: var(--ec-primary);
	font-size: 20px;
}
.ec-modal-meta {
	list-style: none;
	margin: 0 0 12px;
	padding: 0;
	font-size: 14px;
}
.ec-modal-meta li {
	margin-bottom: 6px;
}
.ec-modal-excerpt {
	font-size: 14px;
	color: #444;
	margin-bottom: 14px;
}
.ec-modal-loading {
	text-align: center;
	padding: 30px;
	color: var(--ec-muted);
}

/* ---------- Buttons ---------- */
.ec-details-btn {
	display: inline-block;
	background: var(--ec-primary);
	color: #fff !important;
	padding: 9px 18px;
	border-radius: 6px;
	text-decoration: none;
	font-size: 13px;
	font-weight: 600;
}
.ec-details-btn:hover {
	background: var(--ec-accent);
	color: var(--ec-primary) !important;
}

/* ---------- Full View ---------- */
.ec-full-view {
	max-width: 900px;
	margin: 0 auto;
}
.ec-full-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 12px;
	margin-bottom: 24px;
	border-bottom: 2px solid var(--ec-accent);
	padding-bottom: 12px;
}
.ec-full-title {
	margin: 0;
	color: var(--ec-primary);
	font-size: 26px;
}
.ec-church-filter-form {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
}
.ec-church-filter-form select {
	padding: 6px 10px;
	border-radius: 6px;
	border: 1px solid var(--ec-border);
}
.ec-full-list {
	display: flex;
	flex-direction: column;
	gap: 18px;
}
.ec-full-card {
	display: flex;
	gap: 18px;
	border: 1px solid var(--ec-border);
	border-radius: 10px;
	overflow: hidden;
	background: #fff;
	box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.ec-full-card-flyer {
	flex: 0 0 160px;
	display: block;
}
.ec-full-card-flyer img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.ec-flyer-placeholder {
	width: 100%;
	height: 100%;
	min-height: 120px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #f2f2f2;
	color: #999;
	font-size: 12px;
}
.ec-full-card-body {
	display: flex;
	gap: 16px;
	padding: 16px 16px 16px 0;
	flex: 1;
}
.ec-full-card-date {
	flex: 0 0 60px;
	text-align: center;
	background: var(--ec-primary);
	color: #fff;
	border-radius: 8px;
	padding: 8px 4px;
	height: fit-content;
}
.ec-date-day {
	display: block;
	font-size: 22px;
	font-weight: 700;
	line-height: 1;
}
.ec-date-month {
	display: block;
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	margin-top: 2px;
}
.ec-full-card-info {
	flex: 1;
}
.ec-full-card-title {
	margin: 0 0 8px;
	font-size: 18px;
}
.ec-full-card-title a {
	color: var(--ec-primary);
	text-decoration: none;
}
.ec-full-card-title a:hover {
	text-decoration: underline;
}
.ec-full-card-meta {
	list-style: none;
	margin: 0 0 10px;
	padding: 0;
	font-size: 13px;
	color: #444;
}
.ec-full-card-meta li {
	margin-bottom: 4px;
}
.ec-full-card-meta a {
	color: var(--ec-primary);
}
.ec-full-card-excerpt {
	font-size: 13px;
	color: #555;
	margin-bottom: 12px;
}
.ec-no-events {
	color: var(--ec-muted);
	text-align: center;
	padding: 30px 0;
}

/* ---------- Single Event Template ---------- */
.ec-single-event {
	max-width: 800px;
	margin: 40px auto;
	padding: 0 16px;
}
.ec-single-flyer img {
	width: 100%;
	height: auto;
	border-radius: 10px;
	margin-bottom: 24px;
}
.ec-single-title {
	color: var(--ec-primary);
	font-size: 30px;
	margin: 0 0 16px;
}
.ec-single-meta {
	list-style: none;
	margin: 0 0 20px;
	padding: 16px;
	background: #f8f8f8;
	border-radius: 8px;
	font-size: 15px;
}
.ec-single-meta li {
	margin-bottom: 8px;
}
.ec-single-meta li:last-child {
	margin-bottom: 0;
}
.ec-single-meta a {
	color: var(--ec-primary);
	font-weight: 600;
}
.ec-single-content {
	font-size: 15px;
	line-height: 1.7;
	color: #333;
}
.ec-back-link {
	display: inline-block;
	margin-top: 24px;
	font-size: 14px;
	color: var(--ec-primary);
	text-decoration: none;
	font-weight: 600;
}
.ec-back-link:hover {
	text-decoration: underline;
}

/* ---------- Responsive ---------- */
@media (max-width: 600px) {
	.ec-full-card {
		flex-direction: column;
	}
	.ec-full-card-flyer {
		flex: 0 0 auto;
		height: 180px;
	}
	.ec-full-card-body {
		padding: 16px;
	}
	.ec-full-header {
		flex-direction: column;
		align-items: flex-start;
	}
}
