/* الإعدادات العامة للجسم */
body { background-color: #f0f2f5; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; overflow-x: hidden; }

/* الكروت (البطاقات) */
.card { border: none; box-shadow: 0 15px 35px rgba(0,0,0,0.1); border-radius: 20px; overflow: hidden; margin-bottom: 20px; }
.card-header { background: linear-gradient(45deg, #1e7e34, #28a745); padding: 15px; border: none; }

/* عناصر الفورم */
.form-label { font-weight: 600; color: #344767; margin-bottom: 5px; font-size: 0.85rem; }
.form-control, .form-select {
    border-radius: 10px;
    padding: 8px 12px;
    border: 1px solid #d2d6da;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}
.form-control:focus { border-color: #28a745; box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.2); }

/* الأزرار */
.btn-success {
    border-radius: 12px;
    padding: 12px;
    font-weight: bold;
    background: linear-gradient(45deg, #1e7e34, #28a745);
    border: none;
    transition: transform 0.2s;
}
.btn-success:hover { transform: translateY(-2px); box-shadow: 0 5px 15px rgba(40, 167, 69, 0.4); }

/* حقول خاصة وملحوظات */
#id_birth_date { background-color: #f8f9fa; cursor: not-allowed; color: #6c757d; }
.file-hint { font-size: 0.7rem; color: #6c757d; margin-top: 2px; }

/* التجاوب مع الشاشات الكبيرة */
@media (min-width: 992px) {
    .container { max-width: 95% !important; margin-top: 15px !important; }
    .col-lg-4 { width: 33.33% !important; }
    .mb-4 { margin-bottom: 1rem !important; }
    .card-body { padding: 1.5rem !important; }
}

/* التنبيهات والأنيميشن */
.invalid-feedback { display: none; animation: fadeIn 0.3s ease-in; }
.is-invalid ~ .invalid-feedback { display: block !important; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}
/* ============================================================== */
/* تنسيق التذييل المعزول */
.quran-sticky-footer {
    background-color: transparent; /* شفافة عشان تاخد لون الخلفية الرمادي */
    padding: 15px 0;
    margin-top: 10px;
    width: 100%;
}

.verse-wrapper {
    display: inline-block;
    position: relative;
}

.quran-text {
    font-family: 'Amiri', serif;
    font-size: 1.8rem;
    color: #1e7e34;
    font-weight: bold;
    margin-bottom: 10px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.05);
}

.verse-decoration {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.verse-decoration .line {
    height: 2px;
    width: 50px;
    background: linear-gradient(to var(--direction, right), #1e7e34, transparent);
}

/* عكس اتجاه الخط الثاني */
.verse-decoration .line:last-child {
    --direction: left;
}

.surah-name {
    color: #6c757d;
    font-size: 0.9rem;
    font-style: italic;
    font-weight: 500;
}

/* تحسينات للموبايل */
@media (max-width: 768px) {
    .quran-text { font-size: 1.3rem; }
    .verse-decoration .line { width: 30px; }
}
/* ============================================================== */
/* 1. الحالة الافتراضية: خانة المستوى مقفولة تماماً وغير قابلة للنقر */
#id_level {
    pointer-events: none; /* تمنع أي نقرة ماوس */
    background-color: #e9ecef !important; /* لون رمادي باهت (Disabled look) */
    border-color: #dee2e6;
    color: #6c757d;
    transition: all 0.3s ease; /* حركة ناعمة لما تفتح */
    cursor: not-allowed;
}

/* 2. الحالة النشطة: لما السكربت يتأكد من الرقم القومي والسن */
#id_level.is-active {
    pointer-events: auto; /* ترجع قابلة للنقر */
    background-color: #ffffff !important; /* ترجع بيضاء */
    border-color: #28a745; /* حدود خضراء خفيفة عشان نعرفه إنها فتحت */
    color: #212529;
    cursor: pointer;
    box-shadow: 0 0 5px rgba(40, 167, 69, 0.2);
}

/* 3. لزيادة الأمان: لو حد حاول يفتحها بالـ Inspect هيفضل شكلها مقفول */
select#id_level[disabled] {
    opacity: 0.7;
    filter: grayscale(1);
}
/* ============================================================== */
/* إخفاء خانة تاريخ الميلاد بالكامل عن عين المستخدم */
#id_birth_date,
label[for="id_birth_date"] {
    display: none !important;
}

/* لو الخانة جوه div واخد كلاس معينة (مثل mb-3) ممكن نخفي الحاوية كلها */
.field-birth_date {
    display: none !important;
}
