/* CPTT Jalali Datepicker — v8.4.0
 * استفاده در هر صفحه که cptt-input-normalize.js لود شده است.
 * غیرمخرب: از هیچ کلاس عمومی استفاده نمی‌کند، همه‌ی selectorها با .cptt-jdp
 * شروع می‌شوند.
 */
.cptt-jdp{
	position: absolute;
	z-index: 100000;
	direction: rtl;
	background: #fff;
	border: 1px solid #dbe1ea;
	border-radius: 12px;
	box-shadow: 0 12px 40px rgba(15,23,42,.16), 0 2px 6px rgba(15,23,42,.06);
	padding: 10px;
	min-width: 260px;
	font-family: inherit;
	font-size: 13px;
	color: #1e293b;
	user-select: none;
	line-height: 1.4;
}
.cptt-jdp *{ box-sizing: border-box; }
.cptt-jdp__head{
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin-bottom: 8px;
}
.cptt-jdp__head strong{
	flex: 1;
	text-align: center;
	font-weight: 700;
	color: #0f172a;
	font-size: 13px;
}
.cptt-jdp__head button{
	width: 30px; height: 30px;
	border-radius: 8px;
	background: #f1f5f9;
	border: 1px solid #e2e8f0;
	color: #334155;
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
	transition: background .15s;
	padding: 0;
}
.cptt-jdp__head button:hover{ background: #e2e8f0; }
.cptt-jdp__week{
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 2px;
	margin-bottom: 4px;
	font-size: 11px;
	color: #94a3b8;
	text-align: center;
}
.cptt-jdp__week span{ padding: 4px 0; font-weight: 600; }
.cptt-jdp__days{
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 2px;
}
.cptt-jdp__days > span{ /* روزهای خالی ابتدای ماه */
	visibility: hidden;
}
.cptt-jdp__days button{
	aspect-ratio: 1 / 1;
	border: 1px solid transparent;
	background: transparent;
	border-radius: 8px;
	font-size: 12px;
	color: #334155;
	cursor: pointer;
	transition: background .15s, color .15s, border-color .15s;
	padding: 0;
	font-family: inherit;
}
.cptt-jdp__days button:hover{
	background: #eef2ff;
	color: #4f46e5;
}
.cptt-jdp__days button.is-today{
	border-color: #94a3b8;
	color: #0f172a;
	font-weight: 700;
}
.cptt-jdp__days button.is-selected{
	background: #4f46e5;
	color: #fff;
	border-color: #4f46e5;
	font-weight: 700;
}
.cptt-jdp__days button.is-selected:hover{ background: #4338ca; color: #fff; }
.cptt-jdp__time{
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	margin-top: 10px;
	padding-top: 8px;
	border-top: 1px dashed #e2e8f0;
	direction: ltr;
}
.cptt-jdp__time input{
	width: 50px;
	padding: 4px 6px;
	border: 1px solid #e2e8f0;
	border-radius: 6px;
	font-size: 13px;
	text-align: center;
	font-family: inherit;
	background: #fff;
	color: #0f172a;
}
.cptt-jdp__time input:focus{
	outline: none;
	border-color: #4f46e5;
	box-shadow: 0 0 0 2px rgba(79,70,229,.15);
}
.cptt-jdp__time span{ color: #64748b; font-weight: 700; }
.cptt-jdp__foot{
	display: flex;
	gap: 8px;
	margin-top: 10px;
	padding-top: 8px;
	border-top: 1px solid #f1f5f9;
}
.cptt-jdp__foot button{
	flex: 1;
	padding: 6px 10px;
	border-radius: 8px;
	border: 1px solid #e2e8f0;
	background: #f8fafc;
	color: #334155;
	font-size: 12px;
	cursor: pointer;
	transition: background .15s, color .15s;
	font-family: inherit;
}
.cptt-jdp__foot button:hover{ background: #eef2ff; color: #4f46e5; }
.cptt-jdp__foot button[data-today]{ background:#eef2ff; color:#4338ca; }
.cptt-jdp__foot button[data-today]:hover{ background:#e0e7ff; }

/* Dark mode-ish adjustments when placed inside an already-dark ERP panel */
body.cpttf-erp-chromeless .cptt-jdp,
body[data-theme="dark"] .cptt-jdp,
body.cptt-theme-dark .cptt-jdp{
	background: #0f172a;
	border-color: #1e293b;
	color: #e2e8f0;
}
body.cpttf-erp-chromeless .cptt-jdp__head strong,
body[data-theme="dark"] .cptt-jdp__head strong,
body.cptt-theme-dark .cptt-jdp__head strong{ color: #f8fafc; }
body.cpttf-erp-chromeless .cptt-jdp__head button,
body[data-theme="dark"] .cptt-jdp__head button,
body.cptt-theme-dark .cptt-jdp__head button{
	background: #1e293b; border-color: #334155; color: #cbd5e1;
}
body.cpttf-erp-chromeless .cptt-jdp__days button,
body[data-theme="dark"] .cptt-jdp__days button,
body.cptt-theme-dark .cptt-jdp__days button{ color: #cbd5e1; }
body.cpttf-erp-chromeless .cptt-jdp__days button.is-today,
body[data-theme="dark"] .cptt-jdp__days button.is-today,
body.cptt-theme-dark .cptt-jdp__days button.is-today{ border-color:#64748b; color:#f1f5f9; }
body.cpttf-erp-chromeless .cptt-jdp__time input,
body[data-theme="dark"] .cptt-jdp__time input,
body.cptt-theme-dark .cptt-jdp__time input{
	background: #0f172a; border-color: #334155; color: #f8fafc;
}
body.cpttf-erp-chromeless .cptt-jdp__foot button,
body[data-theme="dark"] .cptt-jdp__foot button,
body.cptt-theme-dark .cptt-jdp__foot button{
	background: #1e293b; border-color: #334155; color: #cbd5e1;
}

/* Mobile tweaks */
@media (max-width: 480px){
	.cptt-jdp{ min-width: 240px; font-size: 12px; padding: 8px; }
	.cptt-jdp__days button{ font-size: 11px; }
}
