/* =========================================================================
   Amal Journal — Qadiri Tasbih (Dhikr Counter)
   Path:   assets/css/qadiri-tasbih.css
   Since:  4.2.0
   ========================================================================= */

.aj-qtp-modal {
	position: fixed; inset: 0;
	z-index: 2147483450;
	display: flex; align-items: center; justify-content: center;
	padding: 20px;
	background: rgba(8,12,20,.78);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
}
.aj-qtp-modal[hidden] { display: none !important; }

.aj-qtp-panel {
	position: relative;
	background: #fff; color: #1f2933;
	width: min(560px, 96vw); max-height: 94vh;
	border-radius: 20px;
	display: flex; flex-direction: column; overflow: hidden;
	box-shadow: 0 24px 72px rgba(0,0,0,.5);
	font-family: 'Noto Sans Bengali', 'Kalpurush', sans-serif;
}

.aj-qtp-head {
	display: flex; align-items: center; gap: 10px;
	padding: 14px 18px;
	background: linear-gradient(135deg, #10b981, #047857);
	color: #fff; flex-shrink: 0;
}
.aj-qtp-head h3 {
	margin: 0; font-size: 16px; font-weight: 700; flex: 1;
	overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
	min-width: 0;
}
.aj-qtp-back {
	background: rgba(255,255,255,.15);
	border: none; color: #fff;
	font-size: 20px; line-height: 1; cursor: pointer;
	padding: 4px 10px; border-radius: 8px;
	flex-shrink: 0;
}
.aj-qtp-back[hidden] { display: none !important; }
.aj-qtp-back:hover { background: rgba(255,255,255,.28); }
.aj-qtp-close {
	background: rgba(255,255,255,.15);
	border: none; color: #fff;
	font-size: 22px; line-height: 1; cursor: pointer;
	padding: 4px 10px; border-radius: 8px;
	flex-shrink: 0;
}
.aj-qtp-close:hover { background: rgba(255,255,255,.28); }

.aj-qtp-body {
	flex: 1 1 auto; overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	padding: 16px 20px 24px;
	min-height: 0;
}

.aj-qtp-subtitle {
	margin: 0 0 14px;
	font-size: 13px; color: #6b7280;
	line-height: 1.6;
}

.aj-qtp-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
	gap: 10px;
	margin-bottom: 14px;
}

.aj-qtp-card {
	display: flex; flex-direction: column;
	gap: 8px;
	padding: 14px 12px;
	border: 2px solid #e5e7eb;
	border-radius: 14px;
	background: #f8fafc;
	cursor: pointer;
	text-align: left;
	font-family: inherit;
	color: #1f2933;
	transition: border-color .15s, background .15s, transform .1s, box-shadow .15s;
	-webkit-tap-highlight-color: transparent;
	min-height: 130px;
}
.aj-qtp-card:hover {
	border-color: #10b981; background: #f0fdf4;
	box-shadow: 0 6px 20px rgba(16,185,129,.12);
	transform: translateY(-1px);
}
.aj-qtp-card:active { transform: scale(.98); }
.aj-qtp-card-top {
	display: flex; align-items: center; gap: 8px;
}
.aj-qtp-card-icon { font-size: 24px; line-height: 1; }
.aj-qtp-card-arabic {
	font-family: "Amiri", "Noto Naskh Arabic", serif;
	font-size: 18px; direction: rtl;
	color: #047857; line-height: 1;
}
.aj-qtp-card-label {
	font-size: 13.5px; font-weight: 800;
	color: #1f2933; line-height: 1.3;
}
.aj-qtp-card-translit {
	font-size: 11px; color: #6b7280;
	font-style: italic;
}
.aj-qtp-card-target {
	margin-top: auto;
	font-size: 10.5px; font-weight: 700;
	padding: 3px 8px; border-radius: 999px;
	background: #ecfdf5; color: #065f46;
	align-self: flex-start;
}

.aj-qtp-custom {
	display: flex; flex-direction: column;
	align-items: center; justify-content: center;
	gap: 8px;
	min-height: 130px;
	border: 2px dashed #cbd5e1;
	border-radius: 14px;
	background: #fafafa;
	color: #6b7280;
	font-family: inherit;
	cursor: pointer;
	padding: 14px;
	transition: border-color .15s, background .15s, color .15s;
}
.aj-qtp-custom:hover {
	border-color: #10b981; color: #047857; background: #f0fdf4;
}
.aj-qtp-custom-icon { font-size: 28px; }
.aj-qtp-custom-label { font-size: 12.5px; font-weight: 700; }

.aj-qtp-counter-wrap {
	display: flex; flex-direction: column;
	align-items: center;
	gap: 14px;
}

.aj-qtp-dhikr-head {
	text-align: center; margin-bottom: 4px;
}
.aj-qtp-dhikr-arabic {
	font-family: "Amiri", "Noto Naskh Arabic", serif;
	font-size: 34px; line-height: 1.4;
	color: #047857; direction: rtl;
	margin: 4px 0;
}
.aj-qtp-dhikr-label {
	font-size: 18px; font-weight: 800;
	color: #1f2933;
}
.aj-qtp-dhikr-translit {
	font-size: 12.5px; color: #6b7280;
	font-style: italic;
	margin-top: 2px;
}
.aj-qtp-dhikr-note {
	font-size: 12px; color: #9ca3af;
	margin-top: 6px;
	max-width: 340px;
	line-height: 1.55;
}

.aj-qtp-ring-wrap {
	position: relative;
	width: 220px; height: 220px;
	margin: 10px auto 6px;
	touch-action: manipulation;
}

.aj-qtp-ring {
	transform: rotate(-90deg);
}

.aj-qtp-ring-bg {
	stroke: #e5e7eb;
	stroke-width: 10;
	fill: none;
}

.aj-qtp-ring-fg {
	stroke: #10b981;
	stroke-width: 10;
	fill: none;
	stroke-linecap: round;
	transition: stroke-dashoffset .25s ease, stroke .3s ease;
}
.aj-qtp-ring-fg.is-complete { stroke: #f59e0b; }

.aj-qtp-tap-btn {
	position: absolute;
	inset: 22px;
	border-radius: 50%;
	border: none;
	background: radial-gradient(circle at 35% 30%, #34d399, #10b981 55%, #047857 100%);
	color: #fff;
	cursor: pointer;
	display: flex; flex-direction: column;
	align-items: center; justify-content: center;
	gap: 2px;
	font-family: inherit;
	box-shadow: 0 12px 30px rgba(16,185,129,.35);
	transition: transform .08s, box-shadow .2s;
	-webkit-tap-highlight-color: transparent;
	user-select: none;
}
.aj-qtp-tap-btn:active {
	transform: scale(.94);
	box-shadow: 0 4px 14px rgba(16,185,129,.5);
}
.aj-qtp-tap-btn.is-pulse {
	animation: aj-qtp-pulse .28s ease;
}
@keyframes aj-qtp-pulse {
	0%   { transform: scale(1); }
	50%  { transform: scale(.9); }
	100% { transform: scale(1); }
}

.aj-qtp-count {
	font-size: 56px; font-weight: 800; line-height: 1;
	font-feature-settings: 'tnum';
}
.aj-qtp-count-target {
	font-size: 13px; font-weight: 700;
	opacity: .85;
}

.aj-qtp-meta {
	display: flex; gap: 8px; flex-wrap: wrap;
	justify-content: center;
	margin-top: 4px;
}
.aj-qtp-chip {
	font-size: 11.5px; font-weight: 700;
	padding: 5px 12px; border-radius: 999px;
	background: #f3f4f6; color: #4b5563;
}
.aj-qtp-chip.is-gold {
	background: #fef3c7; color: #92400e;
}

.aj-qtp-targets {
	display: flex; gap: 6px; flex-wrap: wrap;
	justify-content: center;
	margin-top: 10px;
}
.aj-qtp-target-btn {
	padding: 6px 12px; border-radius: 999px;
	border: 1px solid #e5e7eb; background: #fff;
	color: #4b5563; font-size: 11.5px; font-weight: 700;
	font-family: inherit; cursor: pointer;
	transition: background .14s, border-color .14s, color .14s;
}
.aj-qtp-target-btn:hover { background: #f0fdf4; border-color: #6ee7b7; }
.aj-qtp-target-btn.is-active {
	background: linear-gradient(135deg, #10b981, #047857);
	border-color: #047857; color: #fff;
}

.aj-qtp-actions {
	display: flex; gap: 8px; margin-top: 14px;
}
.aj-qtp-btn {
	flex: 1;
	padding: 10px 14px; border-radius: 10px;
	border: 1px solid #e5e7eb; background: #f8fafc;
	color: #4b5563; font-size: 12.5px; font-weight: 700;
	font-family: inherit; cursor: pointer;
	transition: background .14s, border-color .14s;
}
.aj-qtp-btn:hover { background: #f0fdf4; border-color: #6ee7b7; }
.aj-qtp-btn.is-danger {
	color: #991b1b; border-color: #fecaca; background: #fef2f2;
}
.aj-qtp-btn.is-danger:hover { background: #fee2e2; }

.aj-qtp-complete {
	display: flex; align-items: center; justify-content: center;
	gap: 8px;
	padding: 10px 14px;
	margin-top: 8px;
	background: linear-gradient(135deg, #fef3c7, #fde68a);
	border: 1px solid #fbbf24;
	border-radius: 10px;
	font-size: 13px; font-weight: 800;
	color: #92400e;
	animation: aj-qtp-celebrate .5s ease;
}
.aj-qtp-complete[hidden] { display: none !important; }
@keyframes aj-qtp-celebrate {
	0%   { transform: scale(.85); opacity: 0; }
	60%  { transform: scale(1.04); opacity: 1; }
	100% { transform: scale(1); }
}

.aj-qtp-empty {
	text-align: center; padding: 30px 20px;
	color: #9ca3af; font-size: 13px;
}

@media (max-width: 700px) {
	.aj-qtp-modal { padding: 0; align-items: stretch; }
	.aj-qtp-panel {
		width: 100%; max-width: 100%;
		max-height: 100vh; max-height: 100dvh;
		border-radius: 0;
	}
	.aj-qtp-body { padding: 14px 16px 20px; }
	.aj-qtp-head h3 { font-size: 14.5px; }
	.aj-qtp-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
	.aj-qtp-card { min-height: 118px; padding: 12px 10px; }
	.aj-qtp-card-arabic { font-size: 16px; }
	.aj-qtp-card-label { font-size: 12.5px; }
	.aj-qtp-ring-wrap { width: 200px; height: 200px; }
	.aj-qtp-count { font-size: 50px; }
	.aj-qtp-dhikr-arabic { font-size: 28px; }
	.aj-qtp-dhikr-label { font-size: 16px; }
}

@media (prefers-color-scheme: dark) {
	.aj-qtp-panel { background: #1e1e1e; color: #e6e8eb; }
	.aj-qtp-body { background: #1e1e1e; }
	.aj-qtp-subtitle { color: #94a3b8; }
	.aj-qtp-card {
		background: #14181f; border-color: #2a313b; color: #e6e8eb;
	}
	.aj-qtp-card:hover {
		background: rgba(16,185,129,.08);
		border-color: #10b981;
	}
	.aj-qtp-card-label { color: #e6e8eb; }
	.aj-qtp-card-translit { color: #94a3b8; }
	.aj-qtp-card-arabic { color: #6ee7b7; }
	.aj-qtp-card-target {
		background: rgba(16,185,129,.2); color: #6ee7b7;
	}
	.aj-qtp-custom {
		background: #14181f; border-color: #2a313b; color: #94a3b8;
	}
	.aj-qtp-custom:hover {
		background: rgba(16,185,129,.08);
		border-color: #10b981; color: #6ee7b7;
	}
	.aj-qtp-dhikr-arabic { color: #6ee7b7; }
	.aj-qtp-dhikr-label { color: #e6e8eb; }
	.aj-qtp-dhikr-translit { color: #94a3b8; }
	.aj-qtp-dhikr-note { color: #64748b; }
	.aj-qtp-ring-bg { stroke: #2a313b; }
	.aj-qtp-chip { background: #232830; color: #94a3b8; }
	.aj-qtp-chip.is-gold { background: rgba(251,191,36,.2); color: #fbbf24; }
	.aj-qtp-target-btn {
		background: #232830; border-color: #2a313b; color: #94a3b8;
	}
	.aj-qtp-target-btn:hover {
		background: rgba(16,185,129,.12); border-color: #10b981;
	}
	.aj-qtp-target-btn.is-active {
		background: linear-gradient(135deg, #10b981, #047857);
		border-color: #10b981; color: #fff;
	}
	.aj-qtp-btn {
		background: #232830; border-color: #2a313b; color: #94a3b8;
	}
	.aj-qtp-btn:hover { background: rgba(16,185,129,.12); border-color: #10b981; }
	.aj-qtp-btn.is-danger {
		background: rgba(220,38,38,.15); border-color: rgba(248,113,113,.3); color: #fca5a5;
	}
	.aj-qtp-btn.is-danger:hover { background: rgba(220,38,38,.25); }
	.aj-qtp-complete {
		background: rgba(251,191,36,.15);
		border-color: rgba(251,191,36,.4);
		color: #fcd34d;
	}
	.aj-qtp-empty { color: #64748b; }
}