/* ============================================
   Whistleblowing Form - CSS Style
   ألوان الهوية البصرية لدولة قطر / عقارات
   ============================================ */

:root {
    /* ألوان الهوية البصرية */
    --whistleblowing-primary-color: #8A1538; /* الأدعم - العنابي القطري */
    --whistleblowing-secondary-color: #A29475; /* الذهبي */
    --danger-color: #d32f2f;
    --success-color: #388e3c;
    --warning-color: #f57c00;
    --whistleblowing-border-color: #ccc;
    --text-color: #333;
    --light-bg: #f4f7f6;
    --padding-default: 15px;
    --whistleblowing-border-radius: 8px;
    --transition: background-color 0.3s;
}

/* ============================================
   الحاوية الخارجية
   ============================================ */

.container {
    max-width: 800px;
    margin: 0 auto;
    background: #fff;
    padding: 30px;
    border-radius: var(--whistleblowing-border-radius);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-top: 5px solid var(--whistleblowing-primary-color);
}

/* ============================================
   الترويسة العلوية
   ============================================ */

.header {
    text-align: center;
    border-bottom: 2px solid var(--whistleblowing-secondary-color);
    padding-bottom: 15px;
    margin-bottom: 25px;
}

.header h2 {
    color: var(--whistleblowing-primary-color);
    margin: 0 0 10px 0;
    font-size: 40px;
}

.header p {
    font-size: 14px;
    color: #666;
    line-height: 1.7;
    text-align: justify;
    margin: 0;
}

/* ============================================
   النموذج الرئيسي
   ============================================ */

.whistleblowing-form-container {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-color);
    line-height: 1.6;
}

body {
    background-color: var(--light-bg);
    padding: 20px;
    margin: 0;
}

/* ============================================
   العناوين والأقسام
   ============================================ */

.section-title {
    background-color: var(--whistleblowing-primary-color);
    color: #fff;
    padding: 12px 15px;
    border-radius: var(--whistleblowing-border-radius);
    margin: 30px 0 15px 0;
    font-size: 18px;
    font-weight: bold;
    border-right: 5px solid var(--whistleblowing-secondary-color);
}

.help-text {
    display: block;
    font-size: 0.85em;
    color: #666;
    line-height: 1.5;
}

/* ============================================
   المجموعات والحقول
   ============================================ */

.form-group {
    margin-bottom: 20px !important;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.95em;
}

.form-group label.required::after {
    content: " *";
    color: var(--danger-color);
    font-weight: bold;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--whistleblowing-border-color);
    border-radius: var(--whistleblowing-border-radius);
    font-size: 0.95em;
    font-family: inherit;
    transition: var(--transition);
    box-sizing: border-box;
    margin: 10px 0 !important;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--whistleblowing-primary-color);
    box-shadow: 0 0 5px rgba(138, 21, 56, 0.2);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
    max-height: 300px;
}

/* ============================================
   الاختيارات والـ Radio Buttons
   ============================================ */

.radio-group {
    display: flex;
    gap: 20px;
    align-items: center;
    margin-top: 10px;
    flex-wrap: wrap;
}

.radio-group input[type="radio"] {
    cursor: pointer;
    margin: 0;
    accent-color: var(--whistleblowing-primary-color);
}

.radio-group label {
    margin: 0;
    font-weight: 400;
    cursor: pointer;
    font-size: 0.95em;
}

/* ============================================
   رفع الملفات
   ============================================ */

.file-upload-container {
    margin: 15px 0;
    background-color: var(--light-bg);
    border-right: 5px solid var(--whistleblowing-secondary-color);
    transition: var(--transition);
}


.evidence-file-input {
    width: 100%;
    padding: 10px;
    cursor: pointer;
    font-size: 0.9em;
    border: 1px dashed var(--whistleblowing-border-color);
}

/* ============================================
   الأزرار
   ============================================ */

.add-btn,
.submit-btn,
.reset-btn {
    padding: 10px 20px;
    border: none;
    border-radius: var(--whistleblowing-border-radius);
    cursor: pointer;
    font-size: 0.95em;
    font-weight: 600;
    transition: var(--transition);
    text-align: center;
}

.add-btn {
    background-color: var(--whistleblowing-secondary-color);
    color: white;
    margin-top: 10px;
    display: inline-block;
    padding: 8px 15px;
    font-size: 14px;
}

.add-btn:hover:not(.hidden) {
    background-color: #8c7e61;
}

.submit-btn {
    background-color: var(--whistleblowing-primary-color);
    color: white;
    width: 100%;
    padding: 12px;
    font-size: 16px;
    margin-top: 6px;
    font-weight: bold;
}

.submit-btn:hover {
    background-color: #6a0d29;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.submit-btn:disabled {
    background-color: #9e9e9e;
    cursor: not-allowed;
}

/* .reset-btn {
    background-color: var(--light-bg);
    color: var(--text-color);
    border: 1px solid var(--whistleblowing-border-color);
    width: 100%;
    padding: 12px;
    margin-top: 10px;
} */

/* .reset-btn:hover {
    background-color: #e0e0e0;
} */

/* ============================================
   صندوق الإقرار والتعهد
   ============================================ */

.declaration-box {
    background-color: #fcf8f2;
    padding: 15px;
    border: 1px solid var(--whistleblowing-secondary-color);
    border-radius: var(--whistleblowing-border-radius);
    /* margin-bottom: 20px; */
}

.declaration-box p {
    line-height: 1.8;
    margin-bottom: 15px;
    color: var(--text-color);
    font-size: 14px;
    text-align: justify;
}

.declaration-box p:last-of-type {
    margin-bottom: 20px;
}

.checkbox-container {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    align-items: center;
}

.checkbox-container input[type="checkbox"] {
    margin-top: 4px;
    cursor: pointer;
    accent-color: var(--whistleblowing-primary-color);
    min-width: 18px;
}

.checkbox-container label {
    margin: 0;
    font-weight: 600;
    cursor: pointer;
    line-height: 1.5;
}

/* ============================================
   إجراءات النموذج
   ============================================ */

.form-actions {
    display: flex;
    gap: 10px;
    flex-direction: column;
}

/* ============================================
   الرسائل (نجاح/خطأ/تحميل) و Modal
   ============================================ */

.form-message {
    padding: 15px;
    border-radius: var(--whistleblowing-border-radius);
    margin-bottom: 15px;
    font-weight: 600;
    display: none;
    animation: slideIn 0.3s ease;
}

.form-message.success {
    background-color: #c8e6c9;
    color: #2e7d32;
    border: 1px solid #81c784;
}

.form-message.error {
    background-color: #ffcdd2;
    color: #c62828;
    border: 1px solid #ef5350;
}

.form-message.loading {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffc107;
}

.form-message:not(.hidden) {
    display: block;
}

/* نافذة رسالة النجاح المنبثقة */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: #fff;
    margin: 15% auto;
    padding: 30px;
    border: 1px solid #888;
    width: 80%;
    max-width: 500px;
    border-radius: var(--whistleblowing-border-radius);
    text-align: center;
    border-top: 5px solid var(--whistleblowing-primary-color);
}

.ref-number {
    font-size: 24px;
    font-weight: bold;
    color: var(--whistleblowing-primary-color);
    margin: 15px 0;
    padding: 10px;
    background: var(--light-bg);
    border-radius: var(--whistleblowing-border-radius);
    letter-spacing: 2px;
}

.close-btn {
    background-color: var(--whistleblowing-secondary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: var(--whistleblowing-border-radius);
    cursor: pointer;
    margin-top: 15px;
    font-weight: 600;
}

.close-btn:hover {
    background-color: #8c7e61;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   حالات مخفية
   ============================================ */

.hidden {
    display: none !important;
}

/* ============================================
   الحالات والتأثيرات
   ============================================ */

.form-group.error input,
.form-group.error select,
.form-group.error textarea {
    border-color: var(--danger-color);
    background-color: #fff5f5;
}

.form-group.error .help-text {
    color: var(--danger-color);
    font-weight: 600;
}

/* ============================================
   التجاوب مع الشاشات الصغيرة
   ============================================ */

@media (max-width: 768px) {
    .whistleblowing-form-container {
        padding: 20px;
        margin: 10px;
    }
    
    .section-title {
        font-size: 1.1em;
        margin: 0px 0 10px 0;
    }
    
    .radio-group {
        gap: 15px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .add-btn,
    .submit-btn,
    .reset-btn {
        width: 100%;
    }
    
    .form-group label {
        font-size: 0.9em;
    }
}

@media (max-width: 480px) {
    .whistleblowing-form-container {
        padding: 15px;
        border-radius: 0;
    }
    
    .section-title {
        font-size: 1em;
        margin: 15px 0 8px 0;
        padding-bottom: 8px;
    }
    
    .form-group {
        margin-bottom: 15px;
    }
    
    .declaration-box {
        padding: 15px;
    }
    
    .declaration-box p {
        font-size: 0.9em;
    }
}
