/* Basic styles for widget layout */
.ecm-map { background: #f0f0f0; border: #710C12 1px solid; }
.ecm-calendar-inner ul { list-style:none; padding:0; margin:0; }
.ecm-calendar-inner li { padding:6px 0; border-bottom:1px solid #eee; }
.ecm-calendar-inner a { color:#710C12; text-decoration:none; }
.ecm-calendar-inner a:hover { text-decoration:underline; }

/* Compact calendar typography and buttons (scoped to widget) */
.ecm-calendar-inner, .ecm-calendar-inner * {
	font-size: 13px !important;
}

/* FullCalendar specific tweaks when loaded inside the widget */
.ecm-calendar-inner .fc-toolbar-title {
	font-size: 14px !important;
	font-weight: 600;
}

.ecm-calendar-inner .fc-button {
	font-size: 12px !important;
	padding: 4px 6px !important;
	line-height: 1 !important;
	border-radius: 4px !important;
}

/* Make the view toggle buttons highly visible inside the widget */
.ecm-widget .ecm-calendar-inner .fc-button.fc-button-primary,
.ecm-widget .ecm-calendar-inner .fc-button:not(.fc-button-disabled),
.ecm-widget .ecm-calendar-inner .fc-button {
	background-color: #710C12 !important;
	color: #fff !important;
	border: 1px solid #710C12 !important;
	box-shadow: none !important;
	text-shadow: none !important;
	font-family: inherit !important;
}
.ecm-widget .ecm-calendar-inner .fc-button:not(.fc-button-active) { opacity: 0.9; }
.ecm-widget .ecm-calendar-inner .fc-button.fc-button-active {
	opacity: 1;
	box-shadow: 0 1px 0 rgba(0,0,0,0.1) inset !important;
}
.ecm-widget .ecm-calendar-inner .fc-button:hover {
	background-color: #8E0F17 !important;
	border-color: #8E0F17 !important;
}

/* Ensure FullCalendar icons render properly */
.ecm-widget .ecm-calendar-inner .fc-icon {
	display: inline-block !important;
	font-family: 'FullCalendar' !important;
	font-style: normal !important;
	font-weight: normal !important;
	line-height: 1 !important;
	vertical-align: middle !important;
	font-size: 14px !important;
	width: auto !important;
	height: auto !important;
}

/* Ensure prev/next buttons show icons correctly */
.ecm-widget .ecm-calendar-inner .fc-prev-button .fc-icon,
.ecm-widget .ecm-calendar-inner .fc-next-button .fc-icon {
	font-size: 16px !important;
	vertical-align: middle !important;
}

/* Make sure icon spacing is correct in buttons */
.ecm-widget .ecm-calendar-inner .fc-button .fc-icon {
	margin: 0 !important;
	padding: 0 !important;
}

/* Fallback: If icons don't load, show text arrows */
.ecm-widget .ecm-calendar-inner .fc-prev-button:not(:has(.fc-icon))::before {
	content: '‹';
	font-size: 20px;
	font-weight: bold;
}

.ecm-widget .ecm-calendar-inner .fc-next-button:not(:has(.fc-icon))::before {
	content: '›';
	font-size: 20px;
	font-weight: bold;
}

/* Make the widget and its map/calendar fill the parent container's height when possible */
.ecm-widget {
	height: 85vh;
	max-height: 85vh;
	display: flex;
	gap: 20px;
	align-items: stretch;
	overflow: hidden;
	margin: 20px auto;
}

.ecm-map {
	height: 100%;
	max-height: 85vh;
}

.ecm-calendar {
	height: 100%;
	max-height: 85vh;
	display: flex;
	flex-direction: column;
	overflow-y: auto;
	overflow-x: hidden;
}

.ecm-calendar-inner {
	flex: 1 1 auto;
	min-height: 0;
	display: flex;
	flex-direction: column;
}

/* Make FullCalendar render area fill the container */
.ecm-calendar-inner .fc, .ecm-calendar-inner .fc .fc-view {
	height: auto !important;
}

/* Remove internal scrolling from FullCalendar */
.ecm-calendar-inner .fc-scroller {
	overflow: visible !important;
	height: auto !important;
}

/* Remove internal scrolling from list view */
.ecm-calendar-inner .fc-list {
	overflow: visible !important;
	height: auto !important;
}

.ecm-calendar-inner .fc-daygrid-event, .ecm-calendar-inner .fc-event, .ecm-calendar-inner .fc-list-item-title {
	font-size: 12px !important;
}

/* Highlight month-day cells that have events */
.ecm-calendar-inner .fc-daygrid-day.ecm-has-event {
	background-color: rgba(113, 12, 18, 0.06); /* light tint */
}

/* Stronger highlight for today when it has events */
.ecm-calendar-inner .fc-daygrid-day.ecm-today-event {
	background-color: rgba(113, 12, 18, 0.12) !important;
	border: 1px solid rgba(113, 12, 18, 0.18) !important;
}

/* Small colored dot indicator in the corner of a day cell with events */
.ecm-calendar-inner .fc-daygrid-day.ecm-has-event .ecm-event-dot {
	position: absolute;
	top: 4px;
	right: 4px;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #710C12;
	box-shadow: 0 0 0 2px rgba(0,0,0,0.03);
}

/* Ensure day cell is positioned for absolute children */
.ecm-calendar-inner .fc-daygrid-day {
	position: relative;
}

/* Make the calendar toolbar compact */
.ecm-calendar-inner .fc-toolbar-chunk {
	gap: 6px;
}

/* Slightly reduce list fallback spacing */
.ecm-calendar-inner ul li { padding:4px 0; }

/* List View Event Styling - Dark background with white text by default */
.ecm-widget .ecm-calendar-inner .fc-list-event {
	background-color: #710C12 !important;
	border-left: 3px solid #8E0F17 !important;
	transition: all 0.2s ease !important;
}

.ecm-widget .ecm-calendar-inner .fc-list-event:hover {
	background-color: #f8f9fa !important;
	border-left-color: #710C12 !important;
	cursor: pointer !important;
}

/* List view event text - White text on dark background */
.ecm-widget .ecm-calendar-inner .fc-list-event .fc-list-event-title,
.ecm-widget .ecm-calendar-inner .fc-list-event .fc-list-event-time,
.ecm-widget .ecm-calendar-inner .fc-list-event .fc-list-event-graphic {
	color: #ffffff !important;
	transition: color 0.2s ease !important;
}

/* List view event link styling */
.ecm-widget .ecm-calendar-inner .fc-list-event a {
	color: #ffffff !important;
	text-decoration: none !important;
}

/* Hover state - Dark text on light background */
.ecm-widget .ecm-calendar-inner .fc-list-event:hover .fc-list-event-title,
.ecm-widget .ecm-calendar-inner .fc-list-event:hover .fc-list-event-time,
.ecm-widget .ecm-calendar-inner .fc-list-event:hover .fc-list-event-graphic,
.ecm-widget .ecm-calendar-inner .fc-list-event:hover a {
	color: #1a1a1a !important;
}

/* List view table rows */
.ecm-widget .ecm-calendar-inner .fc-list-table tr {
	transition: background-color 0.2s ease !important;
}

/* List view event dot indicator */
.ecm-widget .ecm-calendar-inner .fc-list-event-dot {
	border-color: #ffffff !important;
	background-color: #ffffff !important;
	transition: all 0.2s ease !important;
}

.ecm-widget .ecm-calendar-inner .fc-list-event:hover .fc-list-event-dot {
	border-color: #710C12 !important;
	background-color: #710C12 !important;
}