/* T-O Mirabel Calendar Container */
.tomc-calendar-wrapper {
	font-family: 'Teko', 'Satoshi', sans-serif;
	background: #fdfdfd; /* Light background */
	padding: 30px;
	border-radius: 10px;
	border: 1px solid #fbc326; /* Brand Yellow border */
	box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
	color: #333; /* Dark text */
	max-width: 900px;
	margin: 0 auto;
}

.tomc-calendar-title {
	margin: 0;
	color: #222;
	font-size: 2.5rem;
	text-transform: uppercase;
	letter-spacing: 2px;
}

.tomc-calendar-header-actions {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 20px;
}

.tomc-calendar-pagination {
	display: flex;
	gap: 15px;
}

.tomc-calendar-pagination button {
	background: #fff;
	color: #333;
	border: 1px solid #ddd;
	padding: 8px 15px;
	border-radius: 5px;
	cursor: pointer;
	font-family: 'Teko', 'Satoshi', sans-serif;
	font-size: 1.2rem;
	text-transform: uppercase;
	transition: all 0.3s ease;
}

.tomc-calendar-pagination button:hover {
	background: #fbc326;
	color: #fff;
	border-color: #fbc326;
}

.tomc-calendar-pagination button:disabled {
	opacity: 0.3;
	cursor: not-allowed;
	background: transparent;
	color: #999;
}

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

/* Header */
.tomc-calendar-header {
	text-align: center;
	font-weight: 600;
	color: #fbc326;
	font-size: 1.2rem;
	text-transform: uppercase;
	padding-bottom: 10px;
	border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

/* Cells */
.tomc-calendar-cell {
	position: relative;
	aspect-ratio: 1; /* Make it square */
	background-color: #fff;
	border: 1px solid #eaeaea;
	border-radius: 5px;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	transition: all 0.3s ease;
	background-size: cover;
	background-position: center;
}

.tomc-calendar-cell.empty {
	background-color: transparent;
	border-color: transparent;
}

/* Day Numbers */
.tomc-calendar-cell .day-number {
	position: absolute;
	top: 5px;
	right: 8px;
	font-size: 1.8rem;
	font-weight: 600;
	z-index: 2;
	color: #999;
}

.tomc-calendar-cell .day-month {
	font-size: 0.9rem;
	text-transform: uppercase;
	display: block;
	line-height: 1;
	text-align: right;
}

/* Cells with events */
.tomc-calendar-cell.has-event {
	cursor: pointer;
	border-color: #fbc326;
	box-shadow: 0 0 10px rgba(251, 195, 38, 0.2);
}

.tomc-calendar-cell.has-event:hover {
	transform: scale(1.05);
	z-index: 10;
	box-shadow: 0 0 20px rgba(251, 195, 38, 0.6);
	border-color: #fbc326;
}

.tomc-calendar-cell.has-event .day-number {
	color: #fff;
	text-shadow: 0 0 5px #000, 0 0 15px #000;
}

/* Dark overlay so the date is readable over images */
.day-overlay {
	position: absolute;
	top: 0; left: 0; right: 0; bottom: 0;
	background: linear-gradient(to bottom, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.1) 40%, rgba(0,0,0,0.4) 100%);
	z-index: 1;
}
.empty .day-overlay,
.tomc-calendar-cell:not(.has-event) .day-overlay {
	display: none;
}

/* Today highlight */
.tomc-calendar-cell.today {
	border-color: #333;
	box-shadow: 0 0 15px rgba(0, 0, 0, 0.05);
}
.tomc-calendar-cell.today:not(.has-event) .day-number {
	color: #fbc326;
}
.tomc-calendar-cell.today.has-event .day-number {
	color: #fbc326;
	text-shadow: 0 0 10px rgba(0,0,0,0.8);
}


/* Modal (Popup) */
.tomc-modal {
	display: none; /* Hidden by default */
	position: fixed;
	z-index: 99999;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	overflow: auto;
	background-color: rgba(255, 255, 255, 0.85); /* Light background with opacity */
	backdrop-filter: blur(5px);
}

.tomc-modal-content {
	background-color: #fff;
	margin: 10% auto;
	padding: 30px;
	border: 2px solid #fbc326;
	box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
	width: 80%;
	max-width: 600px;
	border-radius: 10px;
	position: relative;
	color: #333;
	font-family: 'Teko', 'Satoshi', sans-serif;
}

.tomc-modal-close {
	color: #fbc326;
	position: absolute;
	top: 10px;
	right: 20px;
	font-size: 40px;
	font-weight: bold;
	cursor: pointer;
	transition: all 0.3s;
}

.tomc-modal-close:hover,
.tomc-modal-close:focus {
	color: #000;
}

.tomc-modal-date {
	font-size: 1.5rem;
	color: #fbc326;
	margin-bottom: 20px;
	text-transform: uppercase;
	border-bottom: 1px solid rgba(0, 0, 0, 0.1);
	padding-bottom: 10px;
}

/* Event Items inside the modal */
.tomc-event-item {
	display: flex;
	gap: 20px;
	margin-bottom: 25px;
	align-items: center;
}

.tomc-event-item:last-child {
	margin-bottom: 0;
}

.tomc-event-image {
	width: 150px;
	height: 150px;
	object-fit: cover;
	border-radius: 5px;
	border: 1px solid #ddd;
	box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
	flex-shrink: 0;
}

.tomc-event-details h3 {
	margin: 0 0 10px 0;
	color: #222;
	font-size: 2rem;
	line-height: 1.1;
}

.tomc-event-details p {
	margin: 0;
	color: #555;
	font-size: 1.2rem;
	line-height: 1.4;
	font-family: 'Satoshi', sans-serif;
}

/* Responsive */
@media (max-width: 600px) {
	.tomc-event-item {
		flex-direction: column;
		text-align: center;
	}
	.tomc-event-image {
		margin: 0 auto;
	}
	
	/* Mobile improvements */
	.tomc-calendar-wrapper {
		padding: 10px;
	}
	.tomc-calendar-header-actions {
		flex-direction: column;
		gap: 15px;
	}
	.tomc-calendar-title {
		text-align: center;
		font-size: 2rem;
	}
	.tomc-calendar-grid {
		gap: 4px; /* Reduce gap to allow bigger cells */
	}
	.tomc-calendar-cell .day-number {
		font-size: 1.2rem;
	}
	.tomc-calendar-cell .day-month {
		font-size: 0.7rem;
	}
}
