/* =========================================================================
   Amal Journal — Gratitude Journal (Shukr)
   =========================================================================
   Path:   assets/css/shukr.css
   Since:  3.9.0
   ========================================================================= */

/* ---------- Modal ---------- */

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

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

/* ---------- Header ---------- */

.aj-shukr-head {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 14px 18px;
	background: linear-gradient(135deg, #10b981, #059669);
	color: #fff;
	flex-shrink: 0;
}

.aj-shukr-head h3 {
	margin: 0;
	font-size: 16px;
	font-weight: 700;
	flex: 1;
	font-family: 'Noto Sans Bengali', 'Kalpurush', sans-serif;
}

.aj-shukr-count {
	font-size: 11px;
	font-weight: 700;
	padding: 3px 9px;
	border-radius: 999px;
	background: rgba(255, 255, 255, .18);
	flex-shrink: 0;
}

.aj-shukr-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;
	font-family: inherit;
	flex-shrink: 0;
}
.aj-shukr-close:hover { background: rgba(255, 255, 255, .28); }

/* ---------- Body ---------- */

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

.aj-shukr-subtitle {
	margin: 0 0 16px;
	font-size: 13.5px;
	color: #6b7280;
	line-height: 1.6;
}

/* ---------- Item rows ---------- */

.aj-shukr-items {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin-bottom: 22px;
}

.aj-shukr-item {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	background: #f8fafc;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	padding: 12px 14px;
	transition: border-color .15s, background .15s;
}
.aj-shukr-item:focus-within {
	border-color: #10b981;
	background: #f0fdf4;
	box-shadow: 0 0 0 3px rgba(16, 185, 129, .1);
}
.aj-shukr-item.is-saved {
	background: #ecfdf5;
	border-color: #34d399;
}

.aj-shukr-num {
	width: 26px;
	height: 26px;
	border-radius: 50%;
	background: linear-gradient(135deg, #10b981, #059669);
	color: #fff;
	font-weight: 700;
	font-size: 13px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	margin-top: 6px;
}

.aj-shukr-input {
	flex: 1;
	min-width: 0;
	padding: 8px 0;
	border: none;
	background: transparent;
	font-size: 14px;
	font-family: 'Noto Sans Bengali', 'Kalpurush', sans-serif;
	color: #1f2933;
	resize: none;
	line-height: 1.55;
	min-height: 42px;
	outline: none;
}
.aj-shukr-input::placeholder { color: #9ca3af; }

.aj-shukr-save {
	flex-shrink: 0;
	align-self: center;
	background: #10b981;
	color: #fff;
	border: none;
	font-size: 11.5px;
	font-weight: 700;
	padding: 5px 10px;
	border-radius: 7px;
	cursor: pointer;
	font-family: 'Noto Sans Bengali', 'Kalpurush', sans-serif;
	transition: background .15s, transform .1s;
}
.aj-shukr-save:hover { background: #059669; }
.aj-shukr-save:active { transform: scale(.94); }
.aj-shukr-save:disabled { opacity: .5; cursor: wait; }

/* ---------- Weekly recap ---------- */

.aj-shukr-week {
	margin-top: 6px;
	padding-top: 18px;
	border-top: 1px dashed rgba(15, 23, 42, .12);
}

.aj-shukr-week-title {
	margin: 0 0 10px;
	font-size: 13px;
	font-weight: 700;
	color: #1f2933;
	display: flex;
	align-items: center;
	gap: 6px;
}

.aj-shukr-week-badge {
	margin-left: auto;
	font-size: 11px;
	font-weight: 700;
	padding: 3px 9px;
	border-radius: 999px;
	background: #ecfdf5;
	color: #065f46;
}

.aj-shukr-week-grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 6px;
	margin-bottom: 12px;
}

.aj-shukr-day {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	padding: 8px 4px;
	border-radius: 8px;
	background: #f8fafc;
	border: 1px solid #e5e7eb;
	font-size: 10px;
	color: #6b7280;
	position: relative;
}

.aj-shukr-day.is-active {
	background: linear-gradient(135deg, #d1fae5, #a7f3d0);
	border-color: #10b981;
	color: #065f46;
	font-weight: 700;
}
.aj-shukr-day.is-today {
	box-shadow: 0 0 0 2px #10b981;
}

.aj-shukr-day-num {
	font-size: 14px;
	font-weight: 700;
	line-height: 1;
	color: #1f2933;
}
.aj-shukr-day.is-active .aj-shukr-day-num { color: #065f46; }

.aj-shukr-day-count {
	font-size: 10px;
	opacity: .85;
}

.aj-shukr-best {
	font-size: 12px;
	color: #059669;
	padding: 8px 12px;
	background: #ecfdf5;
	border-left: 3px solid #10b981;
	border-radius: 8px;
	font-family: 'Noto Sans Bengali', 'Kalpurush', sans-serif;
}

/* ---------- Empty state ---------- */

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

/* ---------- Mobile ---------- */

@media (max-width: 700px) {
	.aj-shukr-modal { padding: 0; align-items: stretch; }
	.aj-shukr-panel {
		width: 100%;
		max-width: 100%;
		max-height: 100vh;
		max-height: 100dvh;
		border-radius: 0;
	}
	.aj-shukr-body { padding: 14px 16px 20px; }
	.aj-shukr-head h3 { font-size: 14.5px; }
	.aj-shukr-week-grid { gap: 4px; }
	.aj-shukr-day { padding: 6px 2px; }
}

/* ---------- Dark mode ---------- */

@media (prefers-color-scheme: dark) {
	.aj-shukr-panel { background: #1e1e1e; color: #e6e8eb; }
	.aj-shukr-body { background: #1e1e1e; }
	.aj-shukr-subtitle { color: #9aa4b2; }
	.aj-shukr-item {
		background: #14181f;
		border-color: #2a313b;
	}
	.aj-shukr-item:focus-within {
		background: rgba(16, 185, 129, .08);
		border-color: #10b981;
	}
	.aj-shukr-item.is-saved {
		background: rgba(16, 185, 129, .12);
		border-color: #34d399;
	}
	.aj-shukr-input { color: #e6e8eb; }
	.aj-shukr-input::placeholder { color: #64748b; }
	.aj-shukr-week-title { color: #e6e8eb; }
	.aj-shukr-week-badge {
		background: rgba(16, 185, 129, .18);
		color: #6ee7b7;
	}
	.aj-shukr-day {
		background: #14181f;
		border-color: #2a313b;
		color: #94a3b8;
	}
	.aj-shukr-day-num { color: #e6e8eb; }
	.aj-shukr-day.is-active {
		background: rgba(16, 185, 129, .18);
		border-color: #10b981;
		color: #6ee7b7;
	}
	.aj-shukr-day.is-active .aj-shukr-day-num { color: #a7f3d0; }
	.aj-shukr-best {
		background: rgba(16, 185, 129, .15);
		color: #a7f3d0;
	}
	.aj-shukr-week { border-top-color: rgba(255, 255, 255, .08); }
}