/* تقویم سالانه — فرانت‌اند */
.avan-calendar-wrap {
	max-width: 800px;
	margin: 0 auto;
	font-family: inherit;
}

.avan-cal-nav {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 16px;
	margin-bottom: 16px;
}

.avan-cal-nav-btn {
	background: #f0f0f0;
	border: 1px solid #ccc;
	border-radius: 6px;
	padding: 6px 16px;
	cursor: pointer;
	font-size: 18px;
	color: #333;
}

.avan-cal-nav-btn:hover {
	background: #e0e0e0;
}

.avan-cal-title {
	font-size: 18px;
	font-weight: bold;
	min-width: 150px;
	text-align: center;
}

/* Grid */
.avan-cal-header,
.avan-cal-body {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 2px;
}

.avan-cal-weekday {
	text-align: center;
	font-weight: bold;
	padding: 8px 4px;
	background: #f5f5f5;
	border-radius: 4px;
	font-size: 13px;
}

.avan-cal-day {
	min-height: 70px;
	padding: 6px;
	border: 1px solid #eee;
	border-radius: 6px;
	cursor: default;
	position: relative;
	background: #fff;
	transition: background 0.2s;
}

.avan-cal-day.empty {
	background: #fafafa;
	border-color: #f0f0f0;
	cursor: default;
}

.avan-cal-day.has-events {
	cursor: pointer;
	background: #f0f8ff;
}

.avan-cal-day.has-events:hover {
	background: #dceeff;
}

.avan-cal-day.is-holiday {
	background: #fff0f0;
	border-color: #ffc0c0;
}

.avan-cal-day.is-holiday.has-events {
	background: #ffe8e8;
}

/* تعطیل رسمی پررنگ‌تر از پنج‌شنبه دیده می‌شود تا از هم قابل تفکیک بمانند */
.avan-cal-day.is-official-holiday .avan-cal-day-num {
	color: #c62828;
}

.avan-cal-day.is-thursday:not(.is-official-holiday) {
	background: #fff7f2;
	border-color: #ffdcc8;
}

.avan-cal-day.is-thursday:not(.is-official-holiday).has-events {
	background: #ffeee2;
}

.avan-cal-day-num {
	font-weight: bold;
	font-size: 14px;
}

.avan-cal-day-dots {
	display: flex;
	gap: 3px;
	margin-top: 4px;
	flex-wrap: wrap;
}

.avan-cal-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	display: inline-block;
}

.avan-cal-dot.dot-occasion {
	background: #4a90d9;
}

.avan-cal-dot.dot-program {
	background: #f5a623;
}

.avan-cal-dot.dot-holiday {
	background: #e74c3c;
}

/* Detail panel */
.avan-cal-detail {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0,0,0,0.4);
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
}

.avan-cal-detail-content {
	background: #fff;
	border-radius: 12px;
	padding: 24px;
	max-width: 500px;
	width: 90%;
	max-height: 80vh;
	overflow-y: auto;
	box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

.avan-cal-detail-content h3 {
	margin-top: 0;
}

.avan-cal-event-item {
	padding: 10px 0;
	border-bottom: 1px solid #eee;
}

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

.avan-cal-event-item strong {
	display: block;
	margin-bottom: 4px;
}

.avan-cal-event-item p {
	color: #666;
	margin: 4px 0 0;
	font-size: 13px;
}
