.tq-zakat-calc {
	--tq-brand: #4a6b5a;
	--tq-brand-dark: #3a5548;
	--tq-brand-light: #eef4f1;
	--tq-brand-border: rgba(74, 107, 90, 0.16);
	--tq-section-border: rgba(74, 107, 90, 0.4);
	--tq-text: #22302b;
	--tq-muted: #57685f;
	--tq-border: #d7e3de;
	--tq-radius: 16px;
	--tq-warn-bg: #fdf3e6;
	--tq-warn-border: #f0d9b5;
	--tq-warn-text: #8a6416;

	font-family: 'IBM Plex Sans Arabic', Tahoma, Arial, sans-serif;
	color: var(--tq-text);
	width: 100%;
	max-width: 100%;
	margin: 24px 0;
	box-sizing: border-box;
	border: 3px solid var(--tq-brand);
	border-radius: var(--tq-radius);
	overflow: hidden;
	background: #ffffff;
}

.tq-zakat-calc *,
.tq-zakat-calc *::before,
.tq-zakat-calc *::after {
	box-sizing: inherit;
}

/* ----- الرأس ----- */

.tq-zakat-header {
	background: linear-gradient(135deg, #5c7d6c 0%, var(--tq-brand) 100%);
	color: #ffffff;
	text-align: center;
	padding: 16px 20px;
}

.tq-zakat-header-title-row {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	margin-bottom: 8px;
}

.tq-zakat-header-icon {
	display: inline-flex;
	width: 26px;
	height: 26px;
}

.tq-zakat-header-icon svg {
	width: 100%;
	height: 100%;
}

.tq-zakat-title {
	margin: 0;
	font-size: 25px;
	font-weight: 700;
}

.tq-zakat-subtitle {
	margin: 0;
	font-size: 15.5px;
	font-weight: 400;
	opacity: 0.9;
}

/* ----- تبويبات مال / فطر ----- */

.tq-zakat-method-tabs {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 6px;
	background: var(--tq-brand-light);
	padding: 6px;
	margin: 16px 20px 0;
	border-radius: 12px;
	border: 1px solid var(--tq-brand-border);
}

.tq-zakat-method-tab {
	border: none;
	background: transparent;
	padding: 12px 8px;
	border-radius: 9px;
	font-family: inherit;
	font-size: 15px;
	font-weight: 700;
	color: var(--tq-brand-dark);
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.tq-zakat-method-tab.is-active {
	background: var(--tq-brand);
	color: #ffffff;
	box-shadow: 0 3px 8px rgba(74, 107, 90, 0.4);
}

.tq-zakat-body {
	background: #ffffff;
	padding: 20px;
}

/* ----- بلوك الدولة (الخطوة الأولى، خارج التبويبات) ----- */

.tq-zakat-country-block {
	margin: 16px 20px 0;
	padding: 16px;
	background: var(--tq-brand-light);
	border: 2px solid var(--tq-section-border);
	border-radius: 14px;
}

.tq-zakat-country-label {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 10px;
	font-size: 15px;
	font-weight: 700;
	color: var(--tq-brand-dark);
}

.tq-zakat-step-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: var(--tq-brand);
	color: #ffffff;
	font-size: 12.5px;
	font-weight: 700;
	flex-shrink: 0;
}

.tq-zakat-country-select {
	background-color: #ffffff;
}

/* ----- بطاقات الأقسام (كل قسم منفصل بصريًا) ----- */

.tq-zakat-section-card {
	background: var(--tq-brand-light);
	border: 2px solid var(--tq-section-border);
	border-radius: 14px;
	padding: 18px 16px;
	margin-bottom: 18px;
}

.tq-zakat-section-title {
	margin: 0 0 14px;
	font-size: 16px;
	font-weight: 700;
	color: var(--tq-brand-dark);
}

.tq-zakat-section-card .tq-zakat-field:last-child,
.tq-zakat-section-card .tq-zakat-metal-row:last-child,
.tq-zakat-section-card .tq-zakat-price-note:last-child {
	margin-bottom: 0;
}

/* ----- كتلة التاريخ ----- */

.tq-zakat-block {
	margin: 0 0 18px;
}

.tq-zakat-block-label {
	margin: 0 0 12px;
	font-size: 16px;
	font-weight: 700;
	color: var(--tq-brand-dark);
}

.tq-zakat-optional-tag {
	font-size: 12.5px;
	font-weight: 600;
	color: var(--tq-muted);
}

.tq-zakat-tabs {
	display: flex;
	gap: 8px;
	background: var(--tq-brand-light);
	padding: 6px;
	border-radius: 12px;
	margin-bottom: 16px;
	border: 1px solid var(--tq-brand-border);
}

.tq-zakat-tab {
	flex: 1;
	border: none;
	background: transparent;
	padding: 10px 14px;
	border-radius: 9px;
	font-family: inherit;
	font-size: 15px;
	font-weight: 700;
	color: var(--tq-brand-dark);
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.tq-zakat-tab.is-active {
	background: var(--tq-brand);
	color: #ffffff;
	box-shadow: 0 3px 8px rgba(74, 107, 90, 0.4);
}

/* ----- الحقول ----- */

.tq-zakat-field {
	margin-bottom: 16px;
}

.tq-zakat-field-hint {
	margin: 6px 2px 0;
	font-size: 12px;
	font-weight: 500;
	color: var(--tq-muted);
	line-height: 1.5;
}

.tq-zakat-field label {
	display: block;
	font-size: 14px;
	font-weight: 600;
	color: var(--tq-muted);
	margin-bottom: 7px;
}

.tq-zakat-selects {
	display: grid;
	grid-template-columns: 1fr 1fr 1fr;
	gap: 12px;
	margin-bottom: 16px;
}

@media (max-width: 420px) {
	.tq-zakat-selects {
		grid-template-columns: 1fr;
	}
}

.tq-zakat-metal-row {
	display: grid;
	grid-template-columns: 1fr 1fr 1fr;
	gap: 12px;
}

.tq-zakat-metal-row-2 {
	grid-template-columns: 1fr 1fr;
}

@media (max-width: 480px) {
	.tq-zakat-metal-row {
		grid-template-columns: 1fr;
	}
}

.tq-zakat-select,
.tq-zakat-number-input {
	width: 100%;
	padding: 12px 40px;
	border: 1.5px solid var(--tq-border);
	border-radius: 10px;
	background-color: #fafcfb;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2357685f' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: left 14px center;
	background-size: 16px;
	font-family: inherit;
	font-size: clamp(13.5px, 3.8vw, 16px);
	font-weight: 600;
	color: var(--tq-text);
	text-align: center;
	text-align-last: center;
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
}

.tq-zakat-number-input {
	background-image: none;
	padding: 12px;
}

.tq-zakat-select:focus,
.tq-zakat-number-input:focus {
	outline: none;
	border-color: var(--tq-brand);
	background-color: #ffffff;
}

/* ----- حقول المبالغ مع بادج الوحدة/العملة ----- */

.tq-zakat-input-with-unit {
	position: relative;
}

.tq-zakat-input-with-unit .tq-zakat-number-input {
	text-align: right;
	padding-left: 52px;
	padding-right: 14px;
}

.tq-zakat-unit-badge {
	position: absolute;
	left: 12px;
	top: 50%;
	transform: translateY(-50%);
	font-size: 12.5px;
	font-weight: 700;
	color: var(--tq-muted);
	pointer-events: none;
	white-space: nowrap;
	max-width: 60px;
	overflow: hidden;
	text-overflow: ellipsis;
}

.tq-zakat-price-note {
	margin: 8px 0 16px;
	font-size: 12.5px;
	font-weight: 600;
	color: var(--tq-brand-dark);
}

/* ----- التاريخ المعادل ----- */

.tq-zakat-equivalent {
	background: var(--tq-brand-light);
	border: 1.5px solid var(--tq-brand-border);
	border-radius: 12px;
	padding: 14px;
	text-align: center;
}

.tq-zakat-equivalent-label {
	display: block;
	font-size: 14px;
	font-weight: 600;
	color: var(--tq-muted);
	margin-bottom: 7px;
}

.tq-zakat-equivalent-value {
	display: block;
	font-size: 19px;
	font-weight: 700;
	color: var(--tq-text);
}

/* ----- الزر والخطأ ----- */

.tq-zakat-error {
	color: #b3382c;
	font-size: 14.5px;
	font-weight: 600;
	margin: 0 2px 14px;
}

.tq-zakat-btn {
	width: 100%;
	background: var(--tq-brand);
	color: #ffffff;
	border: none;
	border-radius: 10px;
	padding: 15px 22px;
	font-family: inherit;
	font-size: 18px;
	font-weight: 700;
	cursor: pointer;
	transition: background-color 0.15s ease;
	margin-top: 8px;
}

.tq-zakat-btn:hover,
.tq-zakat-btn:focus-visible {
	background: var(--tq-brand-dark);
}

/* ----- النتيجة ----- */

.tq-zakat-result,
.tq-zakat-fitr-result {
	background: #f6faf8;
	border-top: 1.5px solid var(--tq-border);
	padding: 22px 20px;
}

.tq-zakat-verdict {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 14px;
	border-radius: 12px;
	margin-bottom: 20px;
	font-weight: 700;
	font-size: 16px;
	text-align: center;
}

.tq-zakat-verdict.is-due {
	background: #e7f3ec;
	border: 1.5px solid #b6dcc6;
	color: #1f5f3f;
}

.tq-zakat-verdict.is-not-due {
	background: var(--tq-warn-bg);
	border: 1.5px solid var(--tq-warn-border);
	color: var(--tq-warn-text);
}

.tq-zakat-cards {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
	margin-bottom: 20px;
}

@media (max-width: 480px) {
	.tq-zakat-cards {
		grid-template-columns: 1fr;
	}
}

.tq-zakat-card {
	background: var(--tq-brand-light);
	border: 1.5px solid var(--tq-brand-border);
	border-radius: 14px;
	padding: 18px;
	text-align: center;
}

.tq-zakat-card-title {
	display: block;
	font-size: 13.5px;
	font-weight: 700;
	color: var(--tq-brand-dark);
	margin-bottom: 8px;
}

.tq-zakat-card-value {
	display: block;
	font-size: 18px;
	font-weight: 700;
	color: var(--tq-text);
	overflow-wrap: break-word;
	word-break: break-word;
}

.tq-zakat-amount-wrap {
	background: #ffffff;
	border: 2px solid var(--tq-brand);
	border-radius: 16px;
	padding: 26px 20px;
	text-align: center;
	margin-bottom: 20px;
	box-shadow: 0 4px 14px rgba(74, 107, 90, 0.12);
}

.tq-zakat-amount-label {
	display: block;
	font-size: 15px;
	font-weight: 700;
	color: var(--tq-muted);
	margin-bottom: 10px;
}

.tq-zakat-amount-value {
	display: block;
	font-size: clamp(30px, 8vw, 40px);
	font-weight: 800;
	color: var(--tq-brand-dark);
	overflow-wrap: break-word;
	word-break: break-word;
}

/* ----- إحصائيات ----- */

.tq-zakat-stats-wrap {
	background: #ffffff;
	border: 1.5px solid var(--tq-border);
	border-radius: 14px;
	padding: 18px;
	text-align: center;
	margin-bottom: 20px;
}

.tq-zakat-stats-title {
	margin: 0 0 14px;
	font-size: 15px;
	font-weight: 700;
	color: var(--tq-muted);
}

.tq-zakat-stats {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 12px;
}

@media (max-width: 480px) {
	.tq-zakat-stats {
		grid-template-columns: 1fr;
	}
}

.tq-zakat-stat {
	background: var(--tq-brand-light);
	border: 1.5px solid var(--tq-brand-border);
	border-radius: 12px;
	padding: 16px 10px;
	text-align: center;
	overflow: hidden;
}

.tq-zakat-stat-value {
	display: block;
	font-size: 18px;
	font-weight: 700;
	color: var(--tq-text);
	margin-bottom: 4px;
	overflow-wrap: break-word;
	word-break: break-word;
}

.tq-zakat-stat-label {
	display: block;
	font-size: 12.5px;
	font-weight: 600;
	color: var(--tq-muted);
}

/* ----- العد التنازلي لموعد الزكاة القادم ----- */

.tq-zakat-countdown {
	background: #ffffff;
	border: 1.5px solid var(--tq-brand-border);
	border-radius: 14px;
	padding: 18px;
	text-align: center;
}

.tq-zakat-countdown-title {
	margin: 0 0 8px;
	font-size: 15px;
	font-weight: 700;
	color: var(--tq-muted);
}

.tq-zakat-next-date {
	margin: 0 0 14px;
	font-size: 17px;
	font-weight: 700;
	color: var(--tq-brand-dark);
}

.tq-zakat-countdown-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 8px;
}

.tq-zakat-countdown-unit {
	background: var(--tq-brand-light);
	border: 1px solid var(--tq-brand-border);
	border-radius: 10px;
	padding: 12px 8px;
	min-width: 0;
}

.tq-zakat-countdown-num {
	display: block;
	font-size: 22px;
	font-weight: 700;
	color: var(--tq-text);
	font-variant-numeric: tabular-nums;
}

.tq-zakat-countdown-label {
	display: block;
	font-size: 12.5px;
	font-weight: 600;
	color: var(--tq-muted);
	margin-top: 3px;
}

@media (max-width: 420px) {
	.tq-zakat-countdown-grid {
		gap: 6px;
	}

	.tq-zakat-countdown-unit {
		padding: 8px 4px;
		border-radius: 8px;
	}

	.tq-zakat-countdown-num {
		font-size: 16px;
	}

	.tq-zakat-countdown-label {
		font-size: 10.5px;
	}
}
