/**
 * ملحق الأسئلة السيناريوية — أنماط الواجهة الأمامية.
 * RTL آمن (خصائص منطقية) + متغيرات هوية القالب مع بدائل.
 */

.aq-questions,
.aq-answers {
	direction: rtl;
	text-align: start;
}

/* تنبيهات */
.aq-notice {
	background: var(--acaprs-bg-soft, #f6f3ec);
	border: 1px solid var(--acaprs-secondary, #efd9a4);
	border-radius: 12px;
	padding: 14px 18px;
	margin-block-end: 20px;
	color: var(--acaprs-ink, #1f2a30);
	line-height: 1.8;
}
.aq-notice--success {
	border-color: var(--acaprs-gold, #c9a24b);
	background: #fffdf6;
}

/* بطاقة السؤال */
.aq-question {
	background: #fff;
	border: 1px solid #e8e4da;
	border-radius: 18px;
	padding: 22px 26px;
	margin: 0 0 22px;
	box-shadow: 0 6px 24px rgba(75, 44, 95, 0.06);
}
.aq-question legend {
	padding: 0 10px;
	font-weight: 800;
	color: var(--acaprs-primary, #4b2c5f);
	display: flex;
	gap: 12px;
	align-items: center;
	flex-wrap: wrap;
}
.aq-qnum {
	font-size: 1.05rem;
}
.aq-score {
	display: inline-block;
	background: var(--acaprs-primary, #4b2c5f);
	color: #fff;
	font-size: 0.85rem;
	font-weight: 700;
	border-radius: 999px;
	padding: 4px 14px;
}
.aq-pending {
	display: inline-block;
	background: var(--acaprs-bg-soft, #f6f3ec);
	color: var(--acaprs-gold-dark, #a5813a);
	font-size: 0.85rem;
	font-weight: 700;
	border-radius: 999px;
	padding: 4px 14px;
}
.aq-qtext {
	color: var(--acaprs-ink, #1f2a30);
	line-height: 2;
	margin: 6px 0 14px;
}
.aq-label {
	display: block;
	font-weight: 700;
	color: var(--acaprs-primary, #4b2c5f);
	margin-block-end: 8px;
}
.aq-question textarea {
	width: 100%;
	border: 1px solid #d8d3c6;
	border-radius: 12px;
	padding: 12px 14px;
	line-height: 1.9;
	font-family: inherit;
	resize: vertical;
}
.aq-question textarea:focus {
	border-color: var(--acaprs-gold, #c9a24b);
	outline: 2px solid rgba(201, 162, 75, 0.25);
}
.aq-question textarea:disabled {
	background: #faf9f6;
	color: #6b6b68;
}

/* ملاحظات المراجع */
.aq-feedback {
	margin-block-start: 14px;
	background: #fffdf6;
	border-inline-start: 4px solid var(--acaprs-gold, #c9a24b);
	border-radius: 8px;
	padding: 12px 16px;
}
.aq-feedback strong {
	color: var(--acaprs-gold-dark, #a5813a);
}
.aq-feedback p {
	margin: 6px 0 0;
	line-height: 1.9;
}

/* زر الحفظ */
.aq-submit {
	background: var(--acaprs-primary, #4b2c5f);
	color: #fff;
	border: none;
	border-radius: 999px;
	padding: 12px 38px;
	font-size: 1rem;
	font-weight: 800;
	font-family: inherit;
	cursor: pointer;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.aq-submit:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 20px rgba(75, 44, 95, 0.25);
}

/* بطاقات إجاباتي */
.aq-answer-card {
	background: #fff;
	border: 1px solid #e8e4da;
	border-radius: 18px;
	padding: 20px 24px;
	margin: 0 0 18px;
	box-shadow: 0 6px 24px rgba(75, 44, 95, 0.06);
}
.aq-answer-card header {
	display: flex;
	gap: 10px;
	align-items: center;
	flex-wrap: wrap;
	margin-block-end: 8px;
}
.aq-answer-card details {
	margin-block-start: 10px;
}
.aq-answer-card summary {
	cursor: pointer;
	font-weight: 700;
	color: var(--acaprs-primary, #4b2c5f);
}
.aq-mytext {
	background: #faf9f6;
	border-radius: 10px;
	padding: 12px 16px;
	margin-block-start: 8px;
	line-height: 1.9;
	white-space: pre-wrap;
}

/* عرض المدرب لإجابات طالب + تعليق المدرب */
.aq-trainer-answers,
.aq-trainer-track {
	margin: 0 0 24px;
}
.aq-btn {
	display: inline-block;
	background: #efd9a4;
	color: #4b2c5f;
	border-radius: 999px;
	padding: 10px 22px;
	font-weight: 700;
	text-decoration: none;
}
.aq-btn--primary {
	background: #4b2c5f;
	color: #fff;
	border: none;
	cursor: pointer;
}
.aq-feedback-list {
	list-style: none;
	margin: 0 0 18px;
	padding: 0;
}
.aq-feedback-list li {
	background: #faf9f6;
	border: 1px solid #e8e4da;
	border-radius: 12px;
	padding: 12px 16px;
	margin: 0 0 10px;
	line-height: 1.9;
}
.aq-feedback-form {
	background: #fff;
	border: 1px solid #e8e4da;
	border-radius: 18px;
	padding: 20px 24px;
	margin: 0 0 24px;
}
.aq-field {
	margin: 0 0 14px;
}
.aq-field label {
	display: block;
	margin-bottom: 6px;
}
.aq-field input[type="file"],
.aq-field textarea {
	width: 100%;
	max-width: 640px;
}
/* 1.0.5: هدف لمس مريح لحقل اختيار الملف في نموذج تعليق المدرب */
.aq-field input[type="file"] { min-height: 44px; }
.aq-required {
	color: #b3261e;
}
.aq-hint {
	color: #6b5d7a;
	font-size: 0.9em;
}
.aq-notice--error {
	background: #fdecea;
	border-color: #f5c6cb;
}
.aq-trainer-feedback {
	margin-top: 28px;
}

/* ب4 (1.0.4): حماية fieldset من قيد min-width الضمني + حشوات الجوال */
.aq-question { min-width: 0; }
@media (max-width: 640px) {
	.aq-question, .aq-answer-card { padding: 18px 16px; }
}

/* ============================================================
   1.1.0 — التحسين البصري لصفحة «إجاباتي» (لغة معاينة بوابة الطالب المعتمدة:
   بنفسجي #4B2C5F + ذهبي #EFD9A4/#C9A24B + خلفية كريمية).
   كل القواعد التالية محصورة في نطاق غلاف صفحة «إجاباتي» (.aq-answers)
   وبكلاسات خاصة بها، فلا تمس نموذج أسئلة الدروس (.aq-questions)
   ولا صفحات المدرب (.aq-trainer-answers).
   ============================================================ */
.aq-answers {
	text-align: right;
}

/* ترويسة الصفحة (Hero) */
.aq-answers .aq-hero {
	background: linear-gradient(135deg, var(--acaprs-primary, #4b2c5f) 0%, #3a2349 100%);
	border-radius: 18px;
	color: #fff;
	padding: 26px 22px;
	box-shadow: 0 12px 34px rgba(75, 44, 95, 0.09);
	position: relative;
	overflow: hidden;
	direction: rtl;
	text-align: right;
	margin-block-end: 26px;
}
.aq-answers .aq-hero::after {
	content: "";
	position: absolute;
	inset-inline-end: -60px;
	top: -60px;
	width: 220px;
	height: 220px;
	border-radius: 50%;
	background: rgba(239, 217, 164, 0.14);
}
.aq-answers .aq-hero-title {
	color: #fff;
	font-size: 1.65rem;
	font-weight: 800;
	line-height: 1.6;
	margin: 0;
	position: relative;
	z-index: 1;
}
.aq-answers .aq-hero-sub {
	color: #e9ddf2;
	margin: 4px 0 0;
	max-width: 640px;
	line-height: 1.9;
	position: relative;
	z-index: 1;
}
.aq-answers .aq-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 16px;
	position: relative;
	z-index: 1;
}
.aq-answers .aq-chip {
	background: rgba(255, 255, 255, 0.12);
	border: 1px solid rgba(239, 217, 164, 0.45);
	color: #fff;
	border-radius: 999px;
	padding: 4px 15px;
	font-weight: 700;
	font-size: 0.9rem;
}
.aq-answers .aq-chip b {
	color: var(--acaprs-secondary, #efd9a4);
	font-weight: 900;
}
.aq-answers .aq-chip--ok {
	background: rgba(26, 122, 58, 0.35);
	border-color: rgba(140, 230, 170, 0.5);
}
.aq-answers .aq-hero-actions {
	margin-top: 16px;
	position: relative;
	z-index: 1;
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}
.aq-answers .aq-btn-gold {
	background: var(--acaprs-secondary, #efd9a4);
	color: #3a2349;
	font-weight: 900;
	padding: 9px 24px;
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}
.aq-answers .aq-btn-gold:hover {
	background: #f7e8c0;
	color: #3a2349;
}

/* بطاقات الإجابات */
.aq-answers .aq-answer-card {
	position: relative;
	overflow: hidden;
	border-color: #e8e0d2;
	box-shadow: 0 12px 34px rgba(75, 44, 95, 0.09);
	padding: 22px 20px;
}
.aq-answers .aq-card--gold::before {
	content: "";
	position: absolute;
	top: 0;
	inset-inline: 0;
	height: 5px;
	background: linear-gradient(to left, var(--acaprs-gold, #c9a24b), var(--acaprs-secondary, #efd9a4));
}
.aq-answers .aq-card-head {
	justify-content: space-between;
	align-items: flex-start;
	margin-block-end: 10px;
}
.aq-answers .aq-card-title {
	font-size: 1.14rem;
	font-weight: 800;
	color: var(--acaprs-primary, #4b2c5f);
	line-height: 1.6;
	margin: 0;
	flex: 1;
	min-width: 160px;
}
.aq-answers .aq-score {
	flex-shrink: 0;
	font-size: 0.88rem;
	font-weight: 800;
	padding: 4px 15px;
}
.aq-answers .aq-score b {
	color: var(--acaprs-secondary, #efd9a4);
}
.aq-answers .aq-pending {
	flex-shrink: 0;
	background: #fdf3d7;
	color: #9a6a12;
	border: 1px solid var(--acaprs-secondary, #efd9a4);
	font-size: 0.85rem;
	font-weight: 800;
	padding: 4px 15px;
}
.aq-answers .aq-qnum {
	display: inline-block;
	background: #efe7f5;
	color: var(--acaprs-primary, #4b2c5f);
	font-size: 0.85rem;
	font-weight: 800;
	border-radius: 999px;
	padding: 4px 14px;
}
.aq-answers .aq-qtext {
	margin: 6px 0 0;
}
.aq-answers details.aq-fold {
	border-top: 1px dashed #e8e0d2;
	padding-top: 10px;
}
.aq-answers details.aq-fold summary {
	font-weight: 800;
	min-height: 32px;
}
.aq-answers .aq-mytext {
	border: 1px solid #e8e0d2;
}
.aq-answers .aq-feedback {
	border-radius: 10px;
	margin-block-start: 12px;
	line-height: 1.95;
}
.aq-answers .aq-feedback strong {
	color: var(--acaprs-gold-dark, #9a6a12);
}

/* الحالة الفارغة المصممة */
.aq-answers .aq-empty {
	border: 1.5px dashed #d9cba6;
	background: #fffdf6;
	border-radius: 18px;
	padding: 28px 22px;
	text-align: center;
}
.aq-answers .aq-empty-ic {
	font-size: 2rem;
	line-height: 1.2;
}
.aq-answers .aq-empty p {
	color: #6f6580;
	max-width: 520px;
	margin: 6px auto 0;
	line-height: 1.9;
}

/* تعليق المدرب */
.aq-answers .aq-trainer-feedback {
	margin-top: 34px;
}
.aq-answers .aq-sec-title {
	font-size: 1.28rem;
	font-weight: 800;
	color: var(--acaprs-primary, #4b2c5f);
	line-height: 1.6;
	border-bottom: 2px solid var(--acaprs-secondary, #efd9a4);
	padding-bottom: 8px;
	margin: 0 0 16px;
}
.aq-answers .aq-sub-head {
	font-size: 1.05rem;
	font-weight: 800;
	color: var(--acaprs-primary, #4b2c5f);
	line-height: 1.6;
	margin: 20px 0 10px;
}
.aq-answers .aq-tf-empty {
	color: #6f6580;
	line-height: 1.9;
}
.aq-answers .aq-feedback-list li.aq-tf-item {
	border-color: #e8e0d2;
	border-radius: 12px;
	padding: 14px 18px;
	margin: 0 0 12px;
	line-height: 1.95;
}
.aq-answers .aq-tf-file {
	display: inline-block;
	background: var(--acaprs-secondary, #efd9a4);
	color: #3a2349;
	font-weight: 800;
	border-radius: 999px;
	padding: 3px 15px;
	text-decoration: none;
	font-size: 0.88rem;
	margin-bottom: 6px;
}
.aq-answers .aq-tf-item small {
	color: #6f6580;
}

/* شاشات أوسع + سلامة الجوال الضيق */
@media (min-width: 700px) {
	.aq-answers .aq-hero { padding: 30px 34px; }
	.aq-answers .aq-answer-card { padding: 26px 28px; }
}
@media (max-width: 400px) {
	.aq-answers .aq-hero { padding: 22px 16px; }
	.aq-answers .aq-card-title { min-width: 0; }
	.aq-answers .aq-score,
	.aq-answers .aq-pending { white-space: normal; }
}
