/* ==========================================================================
   Wazaif Core — أنماط النماذج والمكوّنات في الواجهة
   تعمل مع أي قالب. القالب المرافق (wazaif-modern) يبني عليها.
   ========================================================================== */

.wz-card {
	background: var(--wz-surface, #fff);
	border: 1px solid var(--wz-line, #e6eaee);
	border-radius: var(--wz-radius, 16px);
	padding: 24px;
}

/* --- النماذج --- */
.wz-form__row { margin-bottom: 16px; }

.wz-form__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 0 16px;
}

.wz-form__legend {
	font-size: 15px;
	font-weight: 700;
	margin: 24px 0 14px;
	padding-bottom: 8px;
	border-bottom: 1px solid var(--wz-line, #e6eaee);
	color: var(--wz-brand, #0f6d5f);
}

.wz-form__legend:first-child { margin-top: 0; }

.wz-label {
	display: block;
	font-size: 14px;
	font-weight: 600;
	margin-bottom: 7px;
	color: var(--wz-text, #1f2328);
}

.wz-req { color: #d93025; }

.wz-form input[type="text"],
.wz-form input[type="email"],
.wz-form input[type="tel"],
.wz-form input[type="url"],
.wz-form input[type="number"],
.wz-form input[type="date"],
.wz-form input[type="search"],
.wz-form select,
.wz-form textarea {
	width: 100%;
	padding: 12px 14px;
	font: inherit;
	font-size: 15px;
	color: var(--wz-text, #1f2328);
	background: var(--wz-input-bg, #fff);
	border: 1.5px solid var(--wz-line, #d9dfe4);
	border-radius: 10px;
	transition: border-color .15s, box-shadow .15s;
	-webkit-appearance: none;
	appearance: none;
}

.wz-form select[multiple] {
	padding: 8px;
	background-image: none;
}

.wz-form input:focus,
.wz-form select:focus,
.wz-form textarea:focus {
	outline: none;
	border-color: var(--wz-brand, #0f6d5f);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--wz-brand, #0f6d5f) 15%, transparent);
}

.wz-form input.is-invalid,
.wz-form textarea.is-invalid {
	border-color: #d93025;
	animation: wz-shake .3s;
}

@keyframes wz-shake {
	25% { transform: translateX(-4px); }
	75% { transform: translateX(4px); }
}

.wz-form textarea { min-height: 120px; resize: vertical; line-height: 1.8; }

/* حقل الجوال مع رمز الدولة */
.wz-phone { display: flex; align-items: stretch; }

.wz-phone__cc {
	display: grid;
	place-items: center;
	padding: 0 14px;
	background: var(--wz-muted-bg, #f2f5f7);
	border: 1.5px solid var(--wz-line, #d9dfe4);
	border-inline-end: 0;
	border-radius: 10px 0 0 10px;
	font-size: 14px;
	font-weight: 600;
	color: var(--wz-dim, #5b6570);
	direction: ltr;
	white-space: nowrap;
}

html[dir="rtl"] .wz-phone__cc {
	border-radius: 0 10px 10px 0;
	border-inline-end: 0;
}

.wz-phone input {
	border-radius: 10px 0 0 10px !important;
	flex: 1;
	min-width: 0;
}

html[dir="rtl"] .wz-phone input { border-radius: 10px 0 0 10px !important; }

.wz-hint { display: block; font-size: 12.5px; color: var(--wz-dim, #6b7580); margin-top: 6px; line-height: 1.7; }

.wz-consent {
	font-size: 12.5px;
	color: var(--wz-dim, #6b7580);
	margin: 14px 0 0;
	line-height: 1.8;
	text-align: center;
}

.wz-consent a { color: inherit; text-decoration: underline; }

/* مصيدة السبام — مخفية عن البشر ومرئية للروبوتات */
.wz-hp {
	position: absolute !important;
	inset-inline-start: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* --- الأزرار --- */
.wz-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 13px 28px;
	font: inherit;
	font-size: 15px;
	font-weight: 700;
	line-height: 1;
	border: 0;
	border-radius: 11px;
	cursor: pointer;
	text-decoration: none;
	transition: transform .12s, filter .15s, box-shadow .15s;
	-webkit-tap-highlight-color: transparent;
}

.wz-btn:hover { filter: brightness(1.07); transform: translateY(-1px); }
.wz-btn:active { transform: translateY(0); }
.wz-btn:disabled { opacity: .6; cursor: wait; transform: none; }
.wz-btn--block { width: 100%; }
.wz-btn--primary { background: var(--wz-brand, #0f6d5f); color: #fff; }
.wz-btn--accent { background: var(--wz-accent, #f4a51c); color: #1f2328; }

.wz-btn--ghost {
	background: transparent;
	color: var(--wz-brand, #0f6d5f);
	border: 1.5px solid currentColor;
}

/* --- رسائل النتيجة --- */
.wz-msg {
	margin-top: 14px;
	padding: 0;
	font-size: 14px;
	line-height: 1.8;
	border-radius: 10px;
	transition: padding .15s;
}

.wz-msg.is-ok,
.wz-msg.is-err { padding: 13px 16px; }

.wz-msg.is-ok { background: #e8f6ee; color: #0a6b45; }
.wz-msg.is-err { background: #fdecea; color: #b3261e; }

/* --- نموذج الاشتراك --- */
.wz-subscribe__title { font-size: 19px; margin: 0 0 8px; }
.wz-subscribe__text { font-size: 14px; color: var(--wz-dim, #5b6570); margin: 0 0 20px; line-height: 1.8; }
.wz-subscribe.is-compact .wz-subscribe__title { font-size: 17px; }

/* --- صندوق البحث --- */
.wz-search { display: flex; flex-wrap: wrap; gap: 10px; align-items: stretch; }

/* min-width:0 ضروري كي تنكمش عناصر flex بدل أن تدفع الزر لسطر جديد */
.wz-search__field { flex: 2 1 200px; min-width: 0; }

.wz-search input[type="search"],
.wz-search__select {
	width: 100%;
	padding: 13px 16px;
	font: inherit;
	font-size: 15px;
	border: 1.5px solid var(--wz-line, #d9dfe4);
	border-radius: 11px;
	background: var(--wz-input-bg, #fff);
	color: var(--wz-text, #1f2328);
}

.wz-search__select { flex: 1 1 130px; min-width: 0; }
.wz-search .wz-btn { flex: 0 0 auto; }

/* على الجوال يصير الاتجاه عموديًا، وعندها يُطبَّق flex-basis على الارتفاع —
   لذلك نُصفّر flex كي يأخذ كل عنصر ارتفاعه الطبيعي. */
@media (max-width: 860px) {
	.wz-search { flex-direction: column; }

	.wz-search__field,
	.wz-search__select,
	.wz-search .wz-btn {
		flex: 0 0 auto;
		width: 100%;
	}
}

/* --- الإعلانات --- */
.wz-ad { margin: 26px 0; text-align: center; min-height: 90px; }

.wz-ad__label {
	display: block;
	font-size: 10px;
	letter-spacing: 1px;
	color: #9aa4ad;
	margin-bottom: 6px;
	text-transform: uppercase;
}

.wz-ad ins { display: block; }

/* --- لافتة المتجر --- */
.wz-store-banner {
	display: flex;
	gap: 20px;
	align-items: center;
	background: linear-gradient(135deg, var(--wz-brand, #0f6d5f), color-mix(in srgb, var(--wz-brand, #0f6d5f) 70%, #000));
	color: #fff;
	border-radius: 18px;
	padding: 24px;
	margin: 30px 0;
	overflow: hidden;
}

.wz-store-banner__img { flex: 0 0 130px; }

.wz-store-banner__img img {
	width: 100%;
	height: auto;
	border-radius: 12px;
	display: block;
}

.wz-store-banner__title { margin: 0 0 8px; font-size: 20px; color: #fff; }
.wz-store-banner__text { margin: 0 0 16px; font-size: 14px; opacity: .92; line-height: 1.8; }

/* --- زر المتجر العائم --- */
.wz-float-store {
	position: fixed;
	inset-block-end: 20px;
	inset-inline-start: 20px;
	z-index: 900;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: var(--wz-accent, #f4a51c);
	color: #1f2328;
	padding: 12px 20px;
	border-radius: 30px;
	text-decoration: none;
	font-weight: 700;
	font-size: 14px;
	box-shadow: 0 6px 20px rgba(0, 0, 0, .18);
	transition: transform .15s;
}

.wz-float-store:hover { transform: translateY(-2px); }

/* --- بطاقة وظيفة احتياطية --- */
.wz-jobs { display: grid; gap: 14px; }

.wz-job {
	border: 1px solid var(--wz-line, #e6eaee);
	border-radius: 14px;
	padding: 18px;
	background: var(--wz-surface, #fff);
}

.wz-job__title { margin: 0 0 8px; font-size: 17px; }
.wz-job__title a { text-decoration: none; color: inherit; }
.wz-job__meta { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; color: var(--wz-dim, #5b6570); }

.wz-empty {
	text-align: center;
	padding: 40px 20px;
	color: var(--wz-dim, #6b7580);
	background: var(--wz-muted-bg, #f7f9fa);
	border-radius: 14px;
}

.wz-section__title { font-size: 22px; margin: 0 0 18px; }

@media (max-width: 600px) {
	.wz-card { padding: 20px 16px; }
	.wz-store-banner { flex-direction: column; text-align: center; }
	.wz-store-banner__img { flex: 0 0 auto; max-width: 160px; }
	.wz-float-store span { display: none; }
	.wz-float-store { padding: 14px; border-radius: 50%; }
}

/* ==========================================================================
   قناة واتساب — بطاقة الانضمام والزر العائم
   ========================================================================== */

.wz-channel {
	background: linear-gradient(140deg, #0f7a4f, #12a05f);
	color: #fff;
	border-radius: 18px;
	padding: 22px;
	margin: 26px 0;
	box-shadow: 0 8px 26px rgba(18, 160, 95, .22);
}

.wz-channel.is-compact { padding: 18px; margin: 16px 0; }

.wz-channel__head {
	display: flex;
	align-items: center;
	gap: 13px;
	margin-bottom: 16px;
}

.wz-channel__icon {
	width: 44px;
	height: 44px;
	flex-shrink: 0;
	display: grid;
	place-items: center;
	background: rgba(255, 255, 255, .17);
	border-radius: 13px;
}

.wz-channel__icon svg { display: block; }
.wz-channel__title { margin: 0; font-size: 17px; color: #fff; line-height: 1.5; }
.wz-channel__sub { margin: 3px 0 0; font-size: 13px; opacity: .9; }

.wz-btn--wa {
	background: #fff;
	color: #0b6b44;
	font-weight: 700;
}

.wz-btn--wa:hover { background: #f2fbf6; color: #0b6b44; }
.wz-btn--wa svg { flex-shrink: 0; }

/* تنبيه إلغاء الكتم — أهم عنصر، لذلك يأخذ تباينًا عاليًا */
.wz-channel__note {
	margin: 14px 0 0;
	padding: 11px 14px;
	background: rgba(0, 0, 0, .22);
	border-radius: 11px;
	font-size: 13px;
	line-height: 1.85;
}

.wz-channel__note strong { color: #ffd76a; }

/* زر القناة في الترويسة */
.wz-header__cta--wa {
	background: #12a05f;
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.wz-header__cta--wa:hover { background: #0d8a50; color: #fff; }
.wz-header__cta--wa svg { flex-shrink: 0; }

/* الزر العائم */
.wz-float-channel {
	position: fixed;
	inset-block-end: 20px;
	inset-inline-start: 20px;
	z-index: 900;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: #12a05f;
	color: #fff;
	padding: 12px 20px;
	border-radius: 30px;
	text-decoration: none;
	font-weight: 700;
	font-size: 14px;
	box-shadow: 0 6px 20px rgba(18, 160, 95, .38);
	transition: transform .15s;
}

.wz-float-channel:hover { transform: translateY(-2px); color: #fff; }

/* لو كان زر المتجر العائم ظاهرًا أيضًا، نرفع القناة فوقه */
.wz-float-store ~ .wz-float-channel { inset-block-end: 78px; }

@media (max-width: 600px) {
	.wz-float-channel span { display: none; }
	.wz-float-channel { padding: 14px; border-radius: 50%; }
	.wz-channel { padding: 18px; }
}
