/* تقویم مدرن شمسی - طراحی جدید */
.modern-persian-calendar {
	direction: rtl;
	font-family: 'IRANSans', Tahoma, Arial, sans-serif;
	background: #ffffff;
	border-radius: 12px;
	border: 1px solid #e5e7eb;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08);
	overflow: visible;
	width: 280px;
	z-index: 100000 !important;
	position: fixed;
	animation: calendarFadeIn 0.3s ease-out;
}

@keyframes calendarFadeIn {
	from {
		opacity: 0;
		transform: translateY(-10px) scale(0.95);
	}
	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

.modern-calendar-header {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: #ffffff;
	padding: 12px 16px;
	text-align: center;
	position: relative;
	overflow: visible;
	border-radius: 12px 12px 0 0;
}

.modern-calendar-close-btn {
	position: absolute;
	top: -12px;
	left: 50%;
	transform: translateX(-50%);
	background: rgba(255, 255, 255, 0.95);
	border: 2px solid #667eea;
	color: #667eea;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	cursor: pointer;
	font-size: 14px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.3s ease;
	backdrop-filter: blur(10px);
	line-height: 1;
	padding: 0;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
	z-index: 10;
}

.modern-calendar-close-btn:hover {
	background: #667eea;
	color: #ffffff;
	transform: translateX(-50%) scale(1.1);
	box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.modern-calendar-close-btn:active {
	transform: translateX(-50%) scale(0.95);
}

.modern-calendar-title {
	font-size: 20px;
	font-weight: 700;
	margin-bottom: 12px;
	text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.modern-calendar-title-container {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 0.375rem;
	margin-bottom: 8px;
	flex-wrap: nowrap;
}

.modern-calendar-month-select,
.modern-calendar-year-select {
	background: rgba(255, 255, 255, 0.95);
	border: 1px solid rgba(255, 255, 255, 0.6);
	color: #4a5568 !important;
	padding: 4px 8px;
	border-radius: 6px;
	font-size: 13px;
	font-weight: 600;
	font-family: 'IRANSans', Tahoma, Arial, sans-serif;
	cursor: pointer;
	transition: all 0.3s ease;
	backdrop-filter: blur(10px);
	outline: none;
	appearance: none;
	-moz-appearance: none;
	-webkit-appearance: none;
	text-align: center;
	direction: rtl;
	-webkit-text-fill-color: #4a5568 !important;
	text-shadow: none;
}

.modern-calendar-month-select {
	min-width: 90px;
	max-width: 110px;
}

.modern-calendar-year-select {
	min-width: 70px;
	max-width: 90px;
}

.modern-calendar-month-select:hover,
.modern-calendar-year-select:hover {
	background: rgba(255, 255, 255, 1);
	border-color: rgba(255, 255, 255, 0.8);
	color: #2d3748 !important;
	-webkit-text-fill-color: #2d3748 !important;
}

.modern-calendar-month-select:focus,
.modern-calendar-year-select:focus {
	background: rgba(255, 255, 255, 1);
	border-color: rgba(255, 255, 255, 0.8);
	box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.4);
	color: #2d3748 !important;
	-webkit-text-fill-color: #2d3748 !important;
}

.modern-calendar-month-select option,
.modern-calendar-year-select option {
	background: #ffffff;
	color: #4a5568;
	padding: 8px;
	direction: rtl;
	text-align: right;
	font-weight: 500;
}

.modern-calendar-nav {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-top: 12px;
}

.modern-calendar-nav-btn {
	background: rgba(255, 255, 255, 0.2);
	border: none;
	color: #ffffff;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	cursor: pointer;
	font-size: 16px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.3s ease;
	backdrop-filter: blur(10px);
	flex-shrink: 0;
}

.modern-calendar-nav-btn:hover {
	background: rgba(255, 255, 255, 0.3);
	transform: scale(1.1);
}

.modern-calendar-nav-btn:active {
	transform: scale(0.95);
}

.modern-calendar-month-year {
	font-size: 16px;
	font-weight: 600;
	color: #ffffff;
}

.modern-calendar-weekdays {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	background: #f8f9fa;
	padding: 6px 4px;
	border-bottom: 1px solid #e9ecef;
}

.modern-calendar-weekday {
	font-size: 12px;
	font-weight: 600;
	color: #6c757d;
	text-align: center;
	padding: 6px 2px;
}

.modern-calendar-days {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 2px;
	padding: 6px 4px;
	background: #ffffff;
	border-radius: 0 0 12px 12px;
}

.modern-calendar-day {
	aspect-ratio: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 12px;
	font-weight: 500;
	color: #212529;
	cursor: pointer;
	border-radius: 4px;
	transition: all 0.2s ease;
	position: relative;
	min-height: 28px;
}

.modern-calendar-day:hover {
	background: #e3f2fd;
	color: #1976d2;
	transform: scale(1.1);
}

.modern-calendar-day.other-month {
	color: #adb5bd;
	opacity: 0.5;
}

.modern-calendar-day.today {
	background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
	color: #856404;
	font-weight: 700;
	box-shadow: 0 2px 8px rgba(255, 215, 0, 0.4);
}

.modern-calendar-day.selected {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: #ffffff;
	font-weight: 700;
	box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
	transform: scale(1.05);
}

/* جمعه‌ها و تعطیلات رسمی */
.modern-calendar-day.friday {
	color: #dc2626; /* قرمز تند اما خوانا */
	font-weight: 600;
}

.modern-calendar-day.holiday {
	color: #b91c1c; /* قرمز پررنگ‌تر برای تعطیلات رسمی */
	font-weight: 700;
}

.modern-calendar-day.friday:hover,
.modern-calendar-day.holiday:hover {
	background: #fee2e2;
	color: #b91c1c;
}

.modern-calendar-day.disabled {
	color: #ced4da;
	cursor: not-allowed;
	opacity: 0.4;
}

.modern-calendar-day.disabled:hover {
	background: transparent;
	transform: none;
}

/* سازگاری با موبایل */
@media (max-width: 768px) {
	.modern-persian-calendar {
		width: 100%;
		max-width: 320px;
	}
	
	.modern-calendar-header {
		padding: 16px;
	}
	
	.modern-calendar-title {
		font-size: 18px;
	}
	
	.modern-calendar-month-select,
	.modern-calendar-year-select {
		font-size: 14px;
		padding: 6px 10px;
	}
	
	.modern-calendar-month-select {
		min-width: 100px;
	}
	
	.modern-calendar-year-select {
		min-width: 80px;
	}
	
	.modern-calendar-day {
		font-size: 14px;
		padding: 8px;
	}
}

/* استایل کادر ورودی تاریخ - همسان با سایر input ها */
.search-date-input,
.persian-date-input {
	padding: 0.5rem 0.75rem !important;
	border: 1.5px solid rgba(37, 99, 235, 0.2) !important;
	border-radius: 8px !important;
	background: #ffffff !important;
	background-color: #ffffff !important;
	color: #1e293b !important;
	font-size: 9pt !important;
	font-family: IRANsans, Tahoma !important;
	transition: all 0.3s ease !important;
	outline: none !important;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
	width: auto !important;
	min-width: 150px !important;
}

.search-date-input:hover,
.persian-date-input:hover {
	border-color: rgba(37, 99, 235, 0.35) !important;
	box-shadow: 0 2px 6px rgba(37, 99, 235, 0.1) !important;
}

.search-date-input:focus,
.persian-date-input:focus {
	border-color: rgba(37, 99, 235, 0.5) !important;
	box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15), 0 0 0 3px rgba(37, 99, 235, 0.1) !important;
	background: #ffffff !important;
	background-color: #ffffff !important;
}

.search-date-input:disabled,
.persian-date-input:disabled,
.search-date-input[readonly],
.persian-date-input[readonly] {
	background: #ffffff !important;
	background-color: #ffffff !important;
	border-color: rgba(148, 163, 184, 0.3) !important;
	color: #1e293b !important;
	cursor: pointer !important;
	opacity: 1 !important;
}

/* استایل wrapper برای کادر ورودی تاریخ */
span[style*="position: relative"][style*="display: inline-block"] {
	position: relative !important;
	display: inline-block !important;
}

/* استایل آیکن تقویم داخل کادر */
span[style*="position: relative"] svg[style*="position: absolute"] {
	position: absolute !important;
	left: 8px !important;
	top: 50% !important;
	transform: translateY(-50%) !important;
	cursor: pointer !important;
	color: #4A90E2 !important;
	pointer-events: auto !important;
	z-index: 10 !important;
}

