/* assets/style.css */
.wp-calendar-wrapper {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
	color: #333;
	max-width: 100%;
	margin: 20px auto;
	padding: 20px;
	background: #fff;
	border-radius: 8px;
}

/* Year Tabs */
.wp-calendar-years {
	display: flex;
	gap: 10px;
	margin-bottom: 20px;
	flex-wrap: wrap;
}

.year-tab {
	padding: 10px 20px;
	border: none;
	background: #f2f5f7;
	cursor: pointer;
	border-radius: 4px;
	font-weight: 600;
	transition: all 0.3s ease;
}

.year-tab.active {
	background: var(--wp-calendar-year-color);
	color: #fff;
}

.year-tab:hover:not(.active) {
	background: var(--wp-calendar-year-hover);
	color: #fff;
}

/* Month Tabs */
.wp-calendar-months {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-bottom: 30px;
}

.month-row {
	display: grid;
	grid-template-columns: repeat(6, 1fr);
	gap: 10px;
}

.month-tab {
	padding: 15px 5px;
	border: none;
	background: var(--wp-calendar-month-color);
	cursor: pointer;
	border-radius: 4px;
	font-weight: 500;
	transition: all 0.3s ease;
	text-align: center;
}

.month-tab.active {
	background: var(--wp-calendar-month-hover);
	color: #fff;
}

.month-tab:hover:not(.active) {
	background: var(--wp-calendar-month-hover);
	color: #fff;
	opacity: 0.8;
}

/* Calendar Content */
.wp-calendar-content h2 {
	font-size: 24px;
	color: var(--wp-calendar-year-color);
	margin-bottom: 20px;
	font-family: serif;
	/* To match the 'January 2026' look in the image */
}

.calendar-grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 10px;
}

.calendar-day-header {
	text-align: center;
	font-weight: 600;
	padding: 10px 0;
	color: #666;
	font-size: 14px;
}

.calendar-day {
	min-height: 120px;
	background: #fff;
	border: 1px solid #edf2f7;
	border-radius: 6px;
	padding: 8px;
	position: relative;
	transition: box-shadow 0.3s ease;
	/* Removed overflow hidden to allow tooltips to pop out */
}

.calendar-day:hover {
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.day-number {
	font-weight: 700;
	font-size: 14px;
	margin-bottom: 10px;
	display: block;
}

/* Event Bar */
.event-bar {
	background: var(--wp-calendar-event-color);
	color: #fff;
	font-size: 16px;
	padding: 5px 8px;
	border-radius: 3px;
	margin-bottom: 3px;
	cursor: pointer;
	position: relative;
	line-height: 25px;
}

.event-bar-text {
	pointer-events: none;
}

/* Tooltip */
.event-tooltip {
	position: absolute;
	bottom: calc(100% + 10px);
	left: 50%;
	transform: translateX(-50%);
	width: 350px;
	/* Increased from 280px */
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
	padding: 20px;
	z-index: 9999;
	display: none;
	pointer-events: none;
	/* Allow mouse to move through to other elements if needed, though usually you want it interactive if there's a link */
}

/* If tooltip has interaction (like Read More link), remove pointer-events: none */
.event-tooltip:has(.tooltip-link) {
	pointer-events: auto;
}

.event-tooltip::after {
	content: '';
	position: absolute;
	top: 100%;
	left: 50%;
	transform: translateX(-50%);
	border-width: 10px;
	border-style: solid;
	border-color: #fff transparent transparent transparent;
}

.event-bar:hover .event-tooltip {
	display: block;
}

.tooltip-title {
	font-weight: 700;
	font-size: 18px;
	margin-bottom: 8px;
	color: #000;
}

.tooltip-date {
	font-size: 14px;
	color: #777;
	margin-bottom: 15px;
}

.tooltip-desc {
	font-size: 14px;
	line-height: 1.5;
	color: #444;
	margin-bottom: 15px;
}

.tooltip-link {
	display: inline-block;
	color: var(--wp-calendar-year-color);
	text-decoration: none;
	font-weight: 600;
	font-size: 14px;
}

.tooltip-link:hover {
	text-decoration: underline;
}

/* Responsive */
@media (max-width: 992px) {
	.month-row {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (max-width: 768px) {
	.calendar-grid {
		grid-template-columns: repeat(7, 1fr);
		/* Keep 7 cols but shrink boxes */
	}

	.calendar-day {
		min-height: 80px;
		padding: 4px;
	}

	.day-number {
		font-size: 12px;
	}

	.event-bar {
		font-size: 9px;
		padding: 2px 4px;
	}
}

@media (max-width: 600px) {
	.month-row {
		grid-template-columns: repeat(2, 1fr);
	}

	.calendar-grid {
		grid-template-columns: repeat(7, 1fr);
	}
}

/* ===== 525px: Single column - only event dates visible ===== */
@media (max-width: 525px) {
	/* 	.calendar-day-header {
	display: none;
} */
	.wp-calendar-content{
		max-height: 390px;
		overflow: auto;
		padding-top:30px;
	}
	.calendar-grid {
		grid-template-columns: 1fr !important;
		gap: 8px;
		/*         max-height: 310px;
		overflow: auto; */
		padding-inline: 8px !important;
	}
	.calendar-day.empty {
		display: none;
	}
	.calendar-day.no-event {
		display: none;
	}
	.calendar-day {
		min-height: unset;
		padding: 10px 12px;
		display: flex;
		align-items: center;
		gap: 8px;
		border: 1px solid #edf2f7;
		flex-direction: column;
	}
	.day-number {
		font-size: 16px;
		margin-bottom: 0;
	}
	.events-container {
		flex: 1;
	}
	.event-bar {
		font-size: 14px !important;
		line-height:24px !important;
		padding: 6px 25px !important;
		margin-bottom: 5px;
		border-radius: 5px;
	}
	/* 	.event-tooltip {
	width: unset !important;
	left: 0 !important;
	transform: none !important;
	right: 0px !important;
} */
.event-tooltip {
        transform: none !important;
        left: 0 !important;
        right: 0 !important;
        transition: unset !important;
        width: 100% !important;
    }
	.tooltip-title {
		margin-bottom:5px;
	}
}