/**
 * Mayville Calendar - Frontend Styles
 * Designed to match Mayville High School brand
 * Colors: Navy (#1B3A6B), Pink (#E84B5E), Cream (#F5EFE7)
 * Typography: Cormorant Garamond (headings), Raleway (body)
 */

/* ===== Base Styles ===== */
.mhs-calendar-month,
.mhs-events-list,
.mhs-upcoming-events,
.mhs-upcoming-widget {
	font-family: 'Raleway', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	color: #333;
}

.mhs-calendar-month h3,
.mhs-events-list h4,
.mhs-upcoming-events h4,
.mhs-upcoming-widget-item .mhs-widget-title {
	font-family: 'Cormorant Garamond', Georgia, serif;
	font-weight: 600;
}

/* ===== Month View Calendar ===== */
.mhs-calendar-month {
	background: #F5EFE7;
	padding: 20px;
	border-radius: 8px;
	box-shadow: 0 2px 8px rgba(27, 58, 107, 0.1);
}

.mhs-calendar-nav {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 20px;
	padding: 0 10px;
}

.mhs-calendar-nav a {
	color: #1B3A6B;
	text-decoration: none;
	font-weight: 600;
	padding: 8px 16px;
	border-radius: 4px;
	transition: all 0.3s ease;
}

.mhs-calendar-nav a:hover {
	background: #E84B5E;
	color: white;
}

.mhs-month-title {
	font-size: 28px;
	color: #1B3A6B;
	margin: 0;
	text-align: center;
}

.mhs-calendar-grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 2px;
	background: #ddd;
	padding: 2px;
	border-radius: 4px;
	overflow: hidden;
}

.mhs-calendar-header {
	background: #1B3A6B;
	color: white;
	padding: 12px;
	text-align: center;
	font-weight: 600;
	font-size: 14px;
	text-transform: uppercase;
}

.mhs-calendar-day {
	background: white;
	min-height: 120px;
	padding: 8px;
	position: relative;
	transition: all 0.2s ease;
}

.mhs-calendar-day:hover {
	background: #f9f7f3;
	box-shadow: inset 0 0 4px rgba(232, 75, 94, 0.1);
}

.mhs-calendar-day.mhs-today {
	background: #FFF9F7;
	border-left: 4px solid #E84B5E;
}

.mhs-calendar-day.mhs-empty {
	background: #f0ebe3;
	cursor: default;
}

.mhs-calendar-day.mhs-empty:hover {
	background: #f0ebe3;
	box-shadow: none;
}

.mhs-day-number {
	font-size: 18px;
	font-weight: 600;
	color: #1B3A6B;
	margin-bottom: 4px;
}

.mhs-day-events {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	margin-top: 4px;
}

.mhs-event-dot {
	display: inline-block;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #E84B5E;
	cursor: pointer;
	transition: all 0.2s ease;
}

.mhs-event-dot:hover {
	width: 10px;
	height: 10px;
	background: #1B3A6B;
}

.mhs-event-dot.mhs-featured {
	background: #1B3A6B;
	box-shadow: 0 0 0 2px #E84B5E;
}

/* Responsive - Tablet */
@media (max-width: 768px) {
	.mhs-calendar-month {
		padding: 15px;
	}

	.mhs-calendar-grid {
		gap: 1px;
		padding: 1px;
	}

	.mhs-calendar-day {
		min-height: 100px;
		padding: 6px;
	}

	.mhs-day-number {
		font-size: 16px;
	}

	.mhs-month-title {
		font-size: 24px;
	}

	.mhs-calendar-header {
		padding: 8px;
		font-size: 12px;
	}
}

/* Responsive - Mobile */
@media (max-width: 480px) {
	.mhs-calendar-month {
		padding: 10px;
	}

	.mhs-calendar-grid {
		gap: 0;
		padding: 0;
	}

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

	.mhs-day-number {
		font-size: 14px;
		margin-bottom: 2px;
	}

	.mhs-month-title {
		font-size: 20px;
	}

	.mhs-calendar-header {
		padding: 6px;
		font-size: 11px;
	}

	.mhs-calendar-nav {
		flex-direction: column;
		gap: 10px;
	}

	.mhs-calendar-nav a {
		width: 100%;
		text-align: center;
	}
}

/* ===== List View ===== */
.mhs-events-list {
	background: #F5EFE7;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 2px 8px rgba(27, 58, 107, 0.1);
}

.mhs-events-list .mhs-no-events {
	padding: 40px 20px;
	text-align: center;
	color: #999;
	font-style: italic;
	margin: 0;
}

.mhs-event-item {
	display: flex;
	align-items: flex-start;
	gap: 20px;
	padding: 20px;
	border-bottom: 1px solid #E8E0D4;
	transition: all 0.2s ease;
}

.mhs-event-item:last-child {
	border-bottom: none;
}

.mhs-event-item:hover {
	background: #FFF9F7;
}

.mhs-event-date-badge {
	flex: 0 0 70px;
	background: #1B3A6B;
	color: white;
	border-radius: 8px;
	padding: 12px;
	text-align: center;
	min-height: 70px;
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.mhs-event-date-day {
	font-size: 28px;
	font-weight: 700;
	line-height: 1;
}

.mhs-event-date-month {
	font-size: 12px;
	text-transform: uppercase;
	margin-top: 4px;
	letter-spacing: 0.5px;
}

.mhs-event-content {
	flex: 1;
}

.mhs-event-title {
	margin: 0 0 8px 0;
	font-size: 20px;
}

.mhs-event-title a {
	color: #1B3A6B;
	text-decoration: none;
	transition: color 0.2s ease;
}

.mhs-event-title a:hover {
	color: #E84B5E;
}

.mhs-event-location {
	margin: 6px 0 0 0;
	color: #666;
	font-size: 14px;
}

.mhs-event-location::before {
	content: '📍 ';
	margin-right: 4px;
}

.mhs-event-time {
	margin: 6px 0 0 0;
	color: #E84B5E;
	font-size: 14px;
	font-weight: 500;
}

.mhs-event-time::before {
	content: '🕐 ';
	margin-right: 4px;
}

/* Responsive - List View */
@media (max-width: 480px) {
	.mhs-event-item {
		flex-direction: column;
		gap: 12px;
		padding: 15px;
	}

	.mhs-event-date-badge {
		width: 100%;
		flex-direction: row;
		gap: 12px;
		min-height: auto;
		align-items: center;
	}

	.mhs-event-date-day {
		font-size: 24px;
	}

	.mhs-event-date-month {
		margin-top: 0;
	}

	.mhs-event-title {
		font-size: 18px;
	}
}

/* ===== Upcoming View ===== */
.mhs-upcoming-events {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.mhs-upcoming-events .mhs-no-events {
	padding: 30px;
	text-align: center;
	color: #999;
	font-style: italic;
	background: #F5EFE7;
	border-radius: 8px;
	margin: 0;
}

.mhs-upcoming-item {
	background: white;
	border-left: 4px solid #1B3A6B;
	border-radius: 4px;
	padding: 15px 20px;
	display: flex;
	align-items: flex-start;
	gap: 15px;
	transition: all 0.2s ease;
	box-shadow: 0 1px 3px rgba(27, 58, 107, 0.08);
}

.mhs-upcoming-item:hover {
	box-shadow: 0 2px 8px rgba(27, 58, 107, 0.15);
	border-left-color: #E84B5E;
}

.mhs-upcoming-date {
	flex: 0 0 60px;
	color: #1B3A6B;
	font-weight: 600;
	font-size: 16px;
	text-align: center;
}

.mhs-upcoming-content {
	flex: 1;
}

.mhs-upcoming-title {
	margin: 0 0 4px 0;
	font-size: 16px;
}

.mhs-upcoming-title a {
	color: #1B3A6B;
	text-decoration: none;
	transition: color 0.2s ease;
}

.mhs-upcoming-title a:hover {
	color: #E84B5E;
}

.mhs-upcoming-time {
	display: block;
	font-size: 13px;
	color: #E84B5E;
	font-weight: 500;
}

/* ===== Upcoming Widget ===== */
.mhs-upcoming-widget {
	background: #F5EFE7;
	border-radius: 8px;
	padding: 15px;
}

.mhs-upcoming-widget .mhs-no-events {
	padding: 20px;
	text-align: center;
	color: #999;
	font-style: italic;
	margin: 0;
	font-size: 14px;
}

.mhs-upcoming-widget-item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px;
	margin: 5px 0;
	border-radius: 4px;
	transition: all 0.2s ease;
}

.mhs-upcoming-widget-item:hover {
	background: white;
}

.mhs-widget-date {
	flex: 0 0 50px;
	background: #1B3A6B;
	color: white;
	padding: 4px 8px;
	border-radius: 4px;
	font-size: 12px;
	font-weight: 600;
	text-align: center;
}

.mhs-widget-title {
	flex: 1;
	color: #1B3A6B;
	text-decoration: none;
	font-size: 14px;
	font-weight: 500;
	transition: color 0.2s ease;
}

.mhs-widget-title:hover {
	color: #E84B5E;
}

/* ===== Loading and States ===== */
.mhs-loading {
	opacity: 0.6;
	pointer-events: none;
}

.mhs-calendar-month.mhs-loading::after {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(255, 255, 255, 0.5);
	border-radius: 8px;
	z-index: 10;
}

/* ===== Badges (Admin) ===== */
.mhs-badge {
	display: inline-block;
	padding: 4px 12px;
	border-radius: 12px;
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.mhs-badge-public {
	background: #E3F2FD;
	color: #1B3A6B;
}

.mhs-badge-private {
	background: #FCE4EC;
	color: #E84B5E;
}

.mhs-badge-gray {
	background: #F5F5F5;
	color: #999;
}
