/* تنسيق زر "أدمن" */
#a-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    background-color: #007bff;
    color: #fff;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    transition: 0.3s;
}

#a-button:hover {
    background-color: #0056b3;
}

/* تصميم النافذة المنبثقة */
.item-container {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding: 10px 0;
    border-radius: 10px;
    background-color: #f9f9f9;
    box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);
    
    width: 100%;
    max-width: 100%; /* ✅ منع تجاوز العناصر لعرض النافذة */
    overflow-x: hidden; /* ✅ منع أي تمرير أفقي داخل العناصر */
    word-wrap: break-word; /* ✅ منع النصوص الطويلة من كسر التصميم */
}

/* عنوان القطاع */
.editable-label {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin-right: 20px;
    width: 20%;
    text-align: right;
}

/* حقل الإدخال */
.editable-field {
    flex-grow: 1;
    width: 70%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

/* زر الحفظ */
.save-button {
    margin-top: 20px;
    padding: 10px 20px;
    background-color: #28a745;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: 0.3s;
}

.save-button:hover {
    background-color: #218838;
}

/* زر الإلغاء */
.cancel-button {
    margin-top: 10px;
    margin-left: 10px;
    padding: 10px 20px;
    background-color: #dc3545;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: 0.3s;
}

.cancel-button:hover {
    background-color: #c82333;
}


#a-popup {/* خلفية النافذة*/
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999 !important;
    overflow: hidden; /* ✅ منع التمرير داخل النافذة */
}

#a-content { /* تنسيق النافذة*/
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    width: 95vw; /* ✅ اجعل العرض أقل بـ 5% من الشاشة */
    max-width: 95vw; /* ✅ منع التوسع الزائد */
    height: 80vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-y: auto; /* ✅ السماح بالتمرير العمودي فقط عند الحاجة */
    overflow-x: hidden; /* ✅ منع التمرير الأفقي نهائيًا */
}



#a-content .content-body {
    flex-grow: 1; /* ✅ السماح للمحتوى بالتمدد */
    overflow-y: auto; /* ✅ السماح بالتمرير */
    padding-bottom: 20px; /* ✅ إضافة مسافة قبل الأزرار */
}

.buttons-container {/*كونتينر ازرار الحفظ والالغاء*/
    display: flex;
    justify-content: space-between;
    padding: 15px;
    background-color: white;
    border-top: 1px solid #ddd;
    position: sticky;
    bottom: 0;
    width: 90%; /* ✅ جعل الأزرار تمتد بكامل العرض */
}


.save-button, .cancel-button {
    padding: 10px 20px;
    font-size: 16px;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.3s;
}

.save-button {
    background-color: #28a745;
    color: #fff;
}

.save-button:hover {
    background-color: #218838;
}

.cancel-button {
    background-color: #dc3545;
    color: #fff;
}

.cancel-button:hover {
    background-color: #c82333;
}

.delete-button{
    background-color: #dc3545;
    color: #fff;
    border: none ;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 10px;

}

/* ✅ تنسيقات النافذة المنبثقة */
.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1002;
}

.multi-file-wrapper {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1003;
    background: white;
    padding: 20px;
    border-radius: 8px;
}

    






#modal-progress-wrapper {
    position: relative;
    width: 100%;
    height: auto;
    min-height: 16px; /* 🔥 مهم جداً */
    background-color: #eee;
    border-radius: 8px;
    overflow: hidden;
    margin-top: 15px;
    z-index: 9999;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);
    box-sizing: border-box; /* ✅ مهم جداً */
  }
  
  #modal-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #1976d2, #64b5f6); /* 💙 أزرق كحلي أنيق */
    transition: width 0.3s ease-in-out;
  }
  
  #modal-progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-weight: bold;
    font-size: 12px;
    pointer-events: none;
    text-shadow: 0 0 2px #000;
  }
  














  .multi-file-modal {
  max-height: 80vh;
  overflow-y: auto;
  padding: 15px;
  background-color: white;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0,0,0,0.15);
  width: 90%;
  max-width: 500px;
}

/* ✅ قائمة عرض الملفات مع scroll وتنظيم */
.file-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-height: 300px;
  overflow-y: auto;
  padding: 10px;
  background-color: #f9f9f9;
  border-radius: 8px;
  border: 1px solid #ccc;
  justify-content: flex-start;
}

/* ✅ كل ملف بصندوق منظم */
/*.file-item {
  width: 100px;
  height: 120px;
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 5px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}*/

/* ✅ الصورة داخل العنصر */
/*.gallery-file {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 5px;
  border: 1px solid #ccc;
}*/

/* ✅ زر الحذف */
.delete-file {
  font-size: 12px;
  background-color: #dc3545;
  color: #fff;
  border: none;
  padding: 4px 6px;
  border-radius: 4px;
  cursor: pointer;
}

/* ✅ الأزرار العامة */
.multi-file-buttons {
  display: flex;
  justify-content: space-between;
  margin-top: 15px;
}
