/**
 * ملف تنسيقات CSS لصفحة طلب مشاركة البيانات
 * OpenSource Requests Form Styles
 */

/* تصميم عام لرفع الملفات */
.file-upload-container {
    position: relative;
    margin-bottom: 20px;
}

.file-upload-wrapper {
    position: relative;
    border: 2px dashed #0a745d;
    border-radius: 12px;
    padding: 30px 20px;
    text-align: center;
    background: linear-gradient(135deg, #f8fff8 0%, #ffffff 100%);
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 220px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.file-upload-wrapper:hover {
    border-color: #085e4a;
    background: linear-gradient(135deg, #e8f5e9 0%, #ffffff 100%);
    box-shadow: 0 8px 25px rgba(10, 116, 93, 0.15);
    transform: translateY(-2px);
}

.file-upload-wrapper.drag-over {
    border-color: #0a745d;
    background: linear-gradient(135deg, #c8e6c9 0%, #e8f5e9 100%);
    box-shadow: 0 12px 35px rgba(10, 116, 93, 0.25);
}

.file-upload-wrapper.uploaded {
    border-color: #4CAF50;
    border-style: solid;
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
}

.file-upload-wrapper.error {
    border-color: #f44336;
    background: linear-gradient(135deg, #ffebee 0%, #ffffff 100%);
}

/* أيقونة الحالة */
.file-status-icon {
    position: absolute;
    top: 15px;
    left: 15px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.3s ease;
}

.file-status-icon.waiting {
    background: rgba(255, 193, 7, 0.2);
    color: #FFC107;
}

.file-status-icon.uploading {
    background: rgba(33, 150, 243, 0.2);
    color: #2196F3;
    animation: pulse 1.5s infinite;
}

.file-status-icon.success {
    background: rgba(76, 175, 80, 0.2);
    color: #4CAF50;
}

.file-status-icon.error {
    background: rgba(244, 67, 54, 0.2);
    color: #f44336;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.7;
    }
}

/* محتوى رفع الملفات */
.file-upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.file-upload-icon {
    font-size: 48px;
    color: #0a745d;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.file-upload-wrapper:hover .file-upload-icon {
    transform: scale(1.1);
    color: #085e4a;
}

.file-upload-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.file-upload-subtitle {
    font-size: 13px;
    color: #888;
    margin: 0;
}

.file-upload-or {
    font-size: 12px;
    color: #aaa;
    margin: 5px 0;
}

.file-upload-text-btn {
    display: inline-block;
    padding: 8px 20px;
    background: linear-gradient(135deg, #0a745d 0%, #085e4a 100%);
    color: white;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
}

.file-upload-text-btn:hover {
    background: linear-gradient(135deg, #085e4a 0%, #064a3c 100%);
    box-shadow: 0 4px 15px rgba(10, 116, 93, 0.3);
}

.file-types-accepted {
    font-size: 11px;
    color: #999;
    margin-top: 10px;
}

.file-types-accepted i {
    margin-left: 5px;
}

/* عرض اسم الملف */
.file-name-display {
    margin-top: 12px;
    padding: 8px 15px;
    background: #f5f5f5;
    border-radius: 8px;
    font-size: 12px;
    color: #333;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: none;
}

.file-name-display.show {
    display: block;
}

.file-name-display.success {
    background: #e8f5e9;
    color: #2e7d32;
}

/* شريط التقدم */
.file-progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: #e0e0e0;
    border-radius: 0 0 10px 10px;
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.file-progress-bar.show {
    opacity: 1;
}

.file-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #0a745d 0%, #4CAF50 100%);
    border-radius: 0 0 10px 10px;
    transition: width 0.3s ease;
}

/* رسالة الخطأ */
.file-error-message {
    position: absolute;
    bottom: -25px;
    left: 0;
    right: 0;
    font-size: 12px;
    color: #f44336;
    text-align: center;
    display: none;
}

.file-error-message.show {
    display: block;
}

/* إخفاء input الملف الأصلي */
.file-input-hidden {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    cursor: pointer;
    z-index: -1;
}

/* شبكة المرفقات */
.attachments-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 20px;
}

@media (max-width: 768px) {
    .attachments-grid {
        grid-template-columns: 1fr;
    }
}

/* تصميم القوائم */
.footer-ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-ul li {
    position: relative;
    padding-right: 25px;
    margin-bottom: 15px;
    line-height: 1.8;
    color: #555;
}

.footer-ul li:before {
    content: "";
    display: block;
    width: 10px;
    height: 10px;
    position: absolute;
    top: 8px;
    right: 0;
    background: linear-gradient(90deg, #0a745d 0%, #438268 100%);
    border-radius: 2px;
}

/* تصميم الأقسام */
.section-header {
    background: linear-gradient(90deg, #0a745d 0%, #438268 100%);
    color: white;
    padding: 15px 25px;
    margin: -30px -30px 25px -30px;
    border-radius: 10px 10px 0 0;
}

.section-header h5 {
    margin: 0;
    font-weight: 600;
    font-size: 18px;
}

.section-header h5 i {
    margin-left: 10px;
}

.section-divider {
    background: linear-gradient(90deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 12px 20px;
    margin: 25px -30px;
    border-top: 3px solid #0a745d;
    border-bottom: 1px solid #e9ecef;
}

.section-divider h5 {
    margin: 0;
    color: #0a745d;
    font-weight: 600;
    font-size: 16px;
}

.section-divider h5 i {
    margin-left: 10px;
}

/* جدول الخيارات */
.options-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.options-table td {
    padding: 15px 20px;
    vertical-align: middle;
    border: 1px solid #e9ecef;
}

.options-table .option-header {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
}

/* خيارات الراديو */
.radio-option-item {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.radio-option-item input[type="radio"] {
    width: 20px;
    height: 20px;
    accent-color: #0a745d;
    cursor: pointer;
}

.radio-option-item label {
    margin: 0;
    cursor: pointer;
    color: #333;
    font-weight: 500;
}

/* تلميحات النموذج */
.email-hint {
    font-size: 12px;
    color: #888;
    margin-top: 5px;
    padding-right: 15px;
}

/* تحسين زر الإرسال */
#contactBtn_Post {
    background: linear-gradient(135deg, #0a745d 0%, #085e4a 100%);
    border: none;
    font-weight: bold;
    padding: 12px 30px;
    font-size: 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

#contactBtn_Post:hover:not([disabled]) {
    background: linear-gradient(135deg, #085e4a 0%, #064a3c 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(10, 116, 93, 0.3);
}

#contactBtn_Post:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* تحسين responsiveness */
@media (max-width: 576px) {
    .section-header {
        margin: -20px -20px 20px -20px;
        padding: 12px 15px;
    }

    .section-divider {
        margin: 20px -20px;
        padding: 10px 15px;
    }

    .contact-form-wrap {
        padding: 20px;
    }

    .options-table td {
        padding: 10px;
        display: block;
        width: 100%;
    }

    .options-table .option-header {
        border-bottom: none;
    }
}

/* أنيميشن للتحميل */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.fa-spinner {
    animation: spin 1s linear infinite;
}

/* تحسين التصميم للطباعة */
@media print {
    .file-upload-wrapper {
        border: 1px solid #333;
    }

    .section-header,
    .section-divider {
        background: #f5f5f5 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}