/* ==========================================================
   Simple Event Calendar – Popup
========================================================== */

.sec-event-popup-overlay {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 16px;
	background: rgba(0, 0, 0, 0.55);
	box-sizing: border-box;
}

.sec-event-popup-overlay.sec-event-popup-open {
	display: flex;
}

.sec-event-popup {
	box-sizing: border-box;
	width: min(680px, 100%);
	max-height: min(80vh, 720px);
	overflow: auto;
	background: #fff;
	border-radius: 12px;
	padding: 16px;
	box-shadow: 0 10px 35px rgba(0, 0, 0, 0.35);
	position: relative;
	font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
	color: #111;
	line-height: 1.35;
}

.sec-event-popup-close {
	position: absolute;
	top: 10px;
	right: 10px;
	width: 36px;
	height: 36px;
	border: 0;
	border-radius: 10px;
	background: transparent;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0 !important;
	margin: 0 !important;
	font-size: 22px;
	line-height: 1;
	color: #444;
}

.sec-event-popup-close:hover {
	background: rgba(0, 0, 0, 0.06);
}

.sec-event-popup-title {
	margin: 0 40px 8px 0;
	font-size: 18px;
	font-weight: 700;
}

.sec-event-popup-media {
	margin: 0 0 14px;
}

.sec-event-popup-image {
	display: block;
	width: 100%;
	max-height: 220px;
	object-fit: cover;
	border-radius: 10px;
	background: #eef2f8;
}

.sec-event-popup-date {
	margin: 0 0 10px;
	font-size: 13px;
	color: #555;
}

.sec-event-popup-excerpt {
	margin: 0 0 12px;
	font-size: 14px;
	color: #222;
	white-space: pre-wrap;
}

.sec-event-popup-meta-row {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 12px;
}

.sec-event-popup-map,
.sec-event-popup-meta {
	margin: 0;
}

.sec-event-popup-meta {
	color: #555;
	line-height: 1.4;
	min-width: 0;
}

.sec-event-popup-meta-title,
.sec-event-popup-meta-address {
	margin: 0;
	font-size: 13px;
}

.sec-event-popup-meta-title {
	font-weight: 600;
	color: #3a465f;
}

.sec-event-popup-meta-address {
	margin-top: 2px;
	color: #6b7280;
}

.sec-event-popup-map-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	text-decoration: none !important;
	border-radius: 10px;
	background: #f5f7fb;
	border: 1px solid #d0d7de;
	color: #242b46 !important;
}

.sec-event-popup-map-link:hover {
	background: #eef2f8;
}

.sec-event-popup-map-link svg {
	width: 18px;
	height: 18px;
	display: block;
	fill: currentColor;
}

.sec-event-popup-link {
	margin: 0;
	text-align: right;
}

.sec-event-popup-view {
	display: inline-block;
	text-decoration: none !important;
	border-radius: 10px;
	padding: 10px 12px;
	font-weight: 600;
	font-size: 13px;
	background: #1f5eff;
	color: #fff !important;
}

.sec-event-popup-view:hover {
	filter: brightness(0.95);
}

/* ==========================================================
   Location filter bar (above calendar)
========================================================== */

.sec-calendar-loading {
	position: absolute;
	inset: 0;
	display: none;
	align-items: center;
	justify-content: flex-start;
	flex-direction: column;
	gap: 10px;
	padding-top: 72px;
	background: rgba(255, 255, 255, 0.88);
	backdrop-filter: blur(1px);
	z-index: 30;
	border-radius: 8px;
}

.fc .fc-view-harness {
	position: relative;
}

.sec-calendar-loading.is-active {
	display: flex;
}

.sec-calendar-loading-spinner {
	width: 28px;
	height: 28px;
	border-radius: 999px;
	border: 3px solid #d0d7de;
	border-top-color: #1e88e5;
	animation: sec-calendar-spin 0.75s linear infinite;
}

.sec-calendar-loading-text {
	font-size: 14px;
	font-weight: 600;
	color: #242b46;
}

@keyframes sec-calendar-spin {
	from { transform: rotate(0deg); }
	to { transform: rotate(360deg); }
}

.sec-calendar-filter {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 12px;
	flex-wrap: wrap;
}

.sec-calendar-filter-label {
	font-weight: 600;
	font-size: 14px;
	color: #242b46;
}

.sec-calendar-filter-input {
	flex: 1;
	min-width: 140px;
	max-width: 280px;
	padding: 8px 12px;
	border: 1px solid #c5c9d0;
	border-radius: 8px;
	font-size: 14px;
}

.sec-calendar-filter-input:focus {
	outline: none;
	border-color: #1e88e5;
	box-shadow: 0 0 0 2px rgba(30, 136, 229, 0.2);
}

.sec-calendar-filter-input.sec-calendar-filter-input-dirty {
	border-color: var(--fc-button-active-border-color, #2c3e50);
	box-shadow: 0 0 0 2px rgba(44, 62, 80, 0.14);
	background: rgba(44, 62, 80, 0.04);
}

.sec-calendar-filter-clear {
	padding: 8px 14px;
	border: 1px solid #c5c9d0;
	border-radius: 8px;
	background: #fff;
	font-size: 13px;
	cursor: pointer;
	color: #555;
}

.sec-calendar-filter-apply {
	padding: 8px 14px;
	border: 1px solid var(--fc-button-active-border-color, #2c3e50);
	border-radius: 8px;
	background: var(--fc-button-active-bg-color, #2c3e50);
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	color: #fff;
}

.sec-calendar-filter-apply:hover {
	filter: brightness(0.95);
}

.sec-calendar-filter-apply:disabled {
	opacity: 0.20;
	cursor: default;
	filter: none;
}

.sec-calendar-filter-clear:hover {
	background: #f5f7fb;
	border-color: #a9acb4;
}

.fc-direction-ltr .fc-toolbar > * > :not(:first-child) {
	margin-left: 0.75em;
	margin-top: 0.2em;
	margin-bottom: 0.2em;
}
/* ==========================================================
   Force override theme .fc-event background
========================================================== */

.fc .fc-list-view .fc-event.fc-list-event {
	background-color: transparent !important;
	border-color: transparent !important;
}

/* ==========================================================
   FullCalendar List View Customization
========================================================== */


/* Base list row styling */
.fc .fc-list-view .fc-list-table {
	border-collapse: separate;
	border-spacing: 0 10px;
}

.fc .fc-list-view .fc-list-day > th {
	padding: 6px 2px 8px;
	background: transparent;
}

.fc .fc-list-view .fc-list-event {
	background-color: #f5f7fb;
	cursor: pointer !important;
}

.fc .fc-list-view .fc-list-event > td {
	padding-top: 14px;
	padding-bottom: 14px;
	background: #f7f9fc;
	border-top: 1px solid #e2e8f0;
	border-bottom: 1px solid #e2e8f0;
	transition: background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.fc .fc-list-view .fc-list-event > td:first-child {
	border-left: 1px solid #e2e8f0;
	border-top-left-radius: 10px;
	border-bottom-left-radius: 10px;
}

.fc .fc-list-view .fc-list-event > td:last-child {
	border-right: 1px solid #e2e8f0;
	border-top-right-radius: 10px;
	border-bottom-right-radius: 10px;
}

/* Remove hover overrides from theme */
.fc .fc-list-view .fc-list-event:hover > td,
.fc .fc-list-view .fc-list-event.sec-list-event-expanded > td {
	background-color: #eef3f9;
	border-color: #cdd7e3;
}

.fc .fc-list-view .fc-list-event:hover > td {
	transform: translateY(-1px);
}

.fc .fc-list-view .fc-list-event .fc-list-event-time,
.fc .fc-list-view .fc-list-event td,
.fc .fc-list-view .fc-list-event .fc-list-event-title,
.fc .fc-list-view .fc-list-event .fc-list-event-graphic,
.fc .fc-list-view .fc-list-event .fc-list-event-title *,
.fc .fc-list-view .fc-list-event .fc-list-event-title a {
	cursor: pointer !important;
}

.fc .fc-list-view .fc-list-event .fc-list-event-title a {
	text-decoration: none;
}

.fc .fc-list-view .fc-list-event .fc-list-event-title a:hover {
	text-decoration: underline;
}

.fc .fc-list .sec-list-continuation .fc-list-event-time {
	color: transparent !important;
	position: relative;
}

.fc .fc-list .sec-list-continuation .fc-list-event-time::before {
	content: '↳';
	position: absolute;
	left: 14px;
	top: 50%;
	transform: translateY(-50%);
	color: #242b46;
}

.fc .fc-list-view .sec-list-detail-row > td {
	padding: 0 0 4px;
	border: 0;
	background: transparent;
}

.sec-list-detail-card-wrap {
	max-height: 0;
	opacity: 0;
	overflow: hidden;
	transform: translateY(-10px);
	transition: max-height 0.36s ease, opacity 0.28s ease, transform 0.36s ease;
	will-change: max-height, opacity, transform;
}

.sec-list-detail-card-wrap.is-open {
	max-height: 360px;
	opacity: 1;
	transform: translateY(0);
}

.sec-list-detail-card {
	display: grid;
	grid-template-columns: 120px minmax(0, 1fr);
	gap: 16px;
	margin: 2px 0 6px;
	padding: 14px;
	background: #ffffff;
	border: 1px solid #dbe3ee;
	border-radius: 10px;
	box-shadow: 0 8px 20px rgba(36, 43, 70, 0.08);
}

.sec-list-detail-card.sec-list-detail-card-no-image {
	grid-template-columns: 1fr;
}

.sec-list-detail-image {
	display: block;
	width: 120px;
	height: 88px;
	object-fit: cover;
	border-radius: 8px;
	background: #e8edf5;
}

.sec-list-detail-body {
	min-width: 0;
}

.sec-list-detail-title {
	margin: 0 0 6px;
	font-size: 16px;
	line-height: 1.3;
	font-weight: 700;
	color: #1f2937;
}

.sec-list-detail-date,
.sec-list-detail-excerpt,
.sec-list-detail-meta-title,
.sec-list-detail-meta-address {
	margin: 0;
}

.sec-list-detail-date {
	font-size: 13px;
	font-weight: 600;
	color: #4b5563;
}

.sec-list-detail-excerpt {
	margin-top: 10px;
	font-size: 14px;
	line-height: 1.5;
	color: #273244;
	white-space: pre-wrap;
}

.sec-list-detail-meta {
	margin-top: 10px;
	color: #5b6678;
}

.sec-list-detail-meta-title {
	font-size: 13px;
	font-weight: 600;
	color: #334155;
}

.sec-list-detail-meta-address {
	margin-top: 2px;
	font-size: 13px;
	color: #6b7280;
}

.sec-list-detail-actions {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 12px;
}

.sec-list-detail-map-link,
.sec-list-detail-view {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 38px;
	border-radius: 10px;
	text-decoration: none !important;
}

.sec-list-detail-map-link {
	width: 38px;
	background: #f5f7fb;
	border: 1px solid #d0d7de;
	color: #242b46 !important;
}

.sec-list-detail-map-link:hover {
	background: #eef2f8;
}

.sec-list-detail-map-link svg {
	width: 18px;
	height: 18px;
	display: block;
	fill: currentColor;
}

.sec-list-detail-view {
	padding: 0 14px;
	background: #1f5eff;
	color: #fff !important;
	font-size: 13px;
	font-weight: 600;
}

.sec-list-detail-view:hover {
	filter: brightness(0.95);
}

/* ==========================================================
   Event State Styling
   (Requires your JS to add:
    sec-event-past / sec-event-ongoing / sec-event-future)
========================================================== */

/* ---------- DOT COLORS (List View) ---------- */

/* Past – title text color in list view */
tr.sec-event-past{
	opacity: 0.4;
}

.fc .fc-list-view .sec-event-past {
	/*box-shadow: inset 4px 0 0 #e53935;*/
	opacity: 0;
}

/* Ongoing */
.fc .fc-list-view .sec-event-ongoing {
	box-shadow: inset 4px 0 0 #43a047;
	font-weight: 600;
}

/* Future */
.fc .fc-list-view .sec-event-future {
	/*box-shadow: inset 4px 0 0 #1e88e5;*/
	opacity: 0;
}

/* ---------- LEFT BORDER INDICATOR (List View) ---------- */

.fc .fc-list-view .sec-event-past {
	/*box-shadow: inset 4px 0 0 #e53935;*/
	opacity: 0.6;
}

.fc .fc-list-view .sec-event-ongoing {
	box-shadow: inset 4px 0 0 #43a047;
	font-weight: 600;
}

.fc .fc-list-view .sec-event-future {
	/*box-shadow: inset 4px 0 0 #1e88e5;*/
}

/* ---------- Month / DayGrid View Indicators ---------- */

.sec-event-past.fc-daygrid-event {
	/*box-shadow: inset 4px 0 0 #e53935;*/
	opacity: 0.6;
}

.sec-event-ongoing.fc-daygrid-event {
	box-shadow: inset 4px 0 0 #43a047;
}
/*
.sec-event-future.fc-daygrid-event {
	box-shadow: inset 4px 0 0 #1e88e5;
}
*/

.sec-event-time {
	font-weight: 500;
	opacity: 0.5;
	margin-left: 5px;
}


/* ==========================================================
   Scroll Offset Fix (List View)
========================================================== */

.fc-list-day {
	scroll-margin-top: 110px;
}

/* ==========================================================
 *  Month (dayGrid) event: stack time over title 
========================================================== */
.fc .fc-daygrid-event .fc-event-main {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	padding:4px;
	padding-left: 8px;
}

.fc .fc-daygrid-event .fc-event-time {
	flex: 0 0 auto;
	margin: 0 0 2px 0;
	line-height: 1.1;
	font-weight: 600;
}

.fc .fc-daygrid-event .fc-event-title-container {
	width: 100%;
}

.fc .fc-daygrid-event .fc-event-title {
	white-space: normal;
	/* allow wrap */
	line-height: 1.15;
}

/* Our custom month-rendered nodes (from eventContent) */
.fc .fc-daygrid-event .sec-dg-time {
	font-size: 12px;
	line-height: 1.2;
	white-space: nowrap;
	font-weight: 600;
}

.fc .fc-daygrid-event .sec-dg-title {
	font-size: 12px;
	line-height: 1.2;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 100%;
}

/* ==========================================================
Add spacing so text clears the red status bar 
========================================================== */
.fc .fc-daygrid-event .fc-event-main {
	padding-left: 6px;
}

/* ==========================================================
   Ongoing Event Dot Animation (List View)
========================================================== */	
/* Animate ONLY ongoing events in list view */
.fc .sec-event-ongoing .fc-list-event-dot {
	animation: sec-dot-breathe 2s ease-in-out infinite;
}

@keyframes sec-dot-breathe {

	0%,
	100% {
		box-shadow: 0 0 4px rgba(67, 160, 71, 0.4);
	}

	50% {
		box-shadow: 0 0 14px rgba(67, 160, 71, 0.9);
	}
}
/* ==========================================================
   Mobile Adjustments
========================================================== */

@media (max-width: 480px) {

	.sec-calendar-loading {
		border-radius: 0;
	}

	.sec-event-popup {
		padding: 14px;
	}

	.sec-event-popup-media {
		margin-bottom: 12px;
	}

	.sec-event-popup-image {
		max-height: 180px;
	}

	.sec-event-popup-title {
		font-size: 16px;
	}

	.sec-event-popup-close {
		width: 34px;
		height: 34px;
	}

	.fc .fc-list-view .fc-list-event > td {
		padding-top: 12px;
		padding-bottom: 12px;
	}

	.sec-list-detail-card {
		grid-template-columns: 1fr;
		gap: 12px;
		padding: 12px;
	}

	.sec-list-detail-image {
		width: 100%;
		height: 148px;
	}
}
