/* الخط */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Arabic:wght@400;500;600;700&display=swap');

body {
  background-color: #f7f5f0;
}

/* البطاقة الرئيسية */
.webform-submission-form {
  font-family: 'IBM Plex Sans Arabic', Tahoma, sans-serif;
  direction: rtl;
  max-width: 700px;
  width: 100%;
  margin: 60px auto;
  background: #fff;
  border-radius: 24px;
  padding: 45px 40px 40px;
  position: relative;
  box-shadow: 0 10px 35px rgba(0,0,0,0.06);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 22px 24px;
  box-sizing: border-box;
}

.webform-submission-form::before {
  content: "";
  position: absolute;
  top: 0; right: 0; left: 0;
  height: 6px;
  border-radius: 24px 24px 0 0;
  background: linear-gradient(90deg, #0f6b3a, #d4a843, #0f6b3a);
}

.webform-back-btn {
  position: absolute;
  top: 0;
  left: 0;
  display: inline-flex;
  align-items: center;
  background-color: #0f6b3a;
  color: #fff;
  border: none;
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.2s ease;
  white-space: nowrap;
}

.webform-back-btn:hover {
  background-color: #f8f2e2;
}

.webform-header-badge {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  margin-top: -15px;
  margin-bottom: 15px;
}
.webform-header-badge img {
  height: 150px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}
/* العنوان والوصف */
.webform-submission-form h2 {
  grid-column: 1 / -1;
  text-align: center;
  font-size: 24px;
  font-weight: 700;
  color: #1a2e22;
  margin: 10px 0 6px;
}

.webform-element-description {
  grid-column: 1 / -1;
  text-align: center;
  color: #8a7a4a;
  font-size: 14px;
  margin-bottom: 25px;
}

/* الأعمدة */
.field-full {
  grid-column: 1 / -1;
}

.field-half {
  grid-column: span 1;
  min-width: 0;
}

/* التسميات */
.webform-submission-form label {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  margin-bottom: 6px;
  display: block;
}

/* الحقول */
.webform-submission-form input[type="text"],
.webform-submission-form input[type="tel"],
.webform-submission-form input[type="email"],
.webform-submission-form select,
.webform-submission-form textarea,
.webform-submission-form input[type="file"] {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid #e6e2d8;
  border-radius: 10px;
  background-color: #f2f0ea;
  font-size: 14px;
  font-family: inherit;
  color: #333;
  box-sizing: border-box;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.webform-submission-form textarea {
  min-height: 90px;
  resize: vertical;
  grid-column: 1 / -1;
}

.webform-submission-form input:focus,
.webform-submission-form select:focus,
.webform-submission-form textarea:focus {
  outline: none;
  border-color: #0f6b3a;
  box-shadow: 0 0 0 3px rgba(15, 107, 58, 0.1);
}

/* زر الإرسال */
.webform-submission-form .form-actions {
  grid-column: 1 / -1;
  margin-top: 10px;
}

.webform-submission-form .form-actions input[type="submit"],
.webform-submission-form .form-actions button[type="submit"] {
  width: 100%;
  background-color: #0f6b3a;
  color: #fff;
  border: none;
  padding: 15px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.webform-submission-form .form-actions input[type="submit"]:hover,
.webform-submission-form .form-actions button[type="submit"]:hover {
  background-color: #0a4d2a;
}

/* ============================= */
/* الاستجابة - الشاشات الكبيرة جداً */
/* ============================= */
@media (min-width: 1400px) {
  .webform-submission-form {
    max-width: 760px;
  }
}

/* ============================= */
/* الاستجابة - أجهزة اللابتوب الصغيرة / التابلت الأفقي */
/* ============================= */
@media (max-width: 900px) {
  .webform-submission-form {
    max-width: 92%;
    margin: 50px auto;
  }
}

/* ============================= */
/* الاستجابة - أجهزة التابلت */
/* ============================= */
@media (max-width: 768px) {
  .webform-submission-form {
    max-width: 90%;
    margin: 40px auto;
    padding: 60px 24px 30px;
  }

  .webform-back-btn {
    top: 20px;
    left: 0;
    font-size: 12px;
    padding: 6px 14px;
  }

  .webform-submission-form h2 {
    font-size: 20px;
  }

  .webform-header-badge img {
    height: 55px;
  }
}

/* ============================= */
/* الاستجابة - الجوال */
/* ============================= */
@media (max-width: 560px) {
  .webform-submission-form {
    max-width: 94%;
    margin: 20px auto;
    padding: 55px 18px 24px;
    border-radius: 18px;
    gap: 16px;
    /* تحويل الأعمدة لعمود واحد بالجوال */
    grid-template-columns: 1fr;
  }

  .field-half {
    grid-column: 1 / -1;
  }

  .webform-back-btn {
    top: 16px;
    left: 0;
    font-size: 11px;
    padding: 5px 12px;
  }

  .webform-submission-form h2 {
    font-size: 18px;
  }

  .webform-element-description {
    font-size: 13px;
  }

  .webform-header-badge img {
    height: 45px;
  }

  /* منع تكبير الصفحة التلقائي على آيفون عند الضغط على الحقل */
  .webform-submission-form input[type="text"],
  .webform-submission-form input[type="tel"],
  .webform-submission-form input[type="email"],
  .webform-submission-form select,
  .webform-submission-form textarea,
  .webform-submission-form input[type="file"] {
    font-size: 16px;
  }

  .webform-submission-form .form-actions input[type="submit"],
  .webform-submission-form .form-actions button[type="submit"] {
    padding: 13px;
    font-size: 15px;
  }
}

/* ============================= */
/* الاستجابة - الجوالات الصغيرة جداً */
/* ============================= */
@media (max-width: 380px) {
  .webform-submission-form {
    max-width: 96%;
    margin: 14px auto;
    padding: 50px 14px 20px;
    border-radius: 14px;
  }

  .webform-submission-form h2 {
    font-size: 16px;
  }

  .webform-element-description {
    font-size: 12px;
    margin-bottom: 18px;
  }

  .webform-submission-form label {
    font-size: 13px;
  }

  .webform-submission-form input[type="text"],
  .webform-submission-form input[type="tel"],
  .webform-submission-form input[type="email"],
  .webform-submission-form select,
  .webform-submission-form textarea {
    padding: 10px 12px;
  }
}

.webform-header-wrap {
  grid-column: 1 / -1;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}
/* أيقونة النجاح */
.course-success-icon {
    width: 85px;
    height: 85px;
    margin: 0 auto 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e7f5ef;
    color: #0f5c49;
    border-radius: 50%;
    font-size: 42px;
    font-weight: bold;
}

/* العنوان */
.course-success-heading {
    text-align: center;
    color: #16302a;
    font-size: 30px;
    font-weight: 700;
    margin: 0 0 15px;
    direction: rtl;
    font-family: "Cairo", "Tajawal", Arial, sans-serif;
}

/* الوصف */
.course-success-description {
    max-width: 600px;
    margin: 0 auto 30px;
    text-align: center;
    color: #5f6b76;
    font-size: 17px;
    line-height: 1.9;
    direction: rtl;
    font-family: "Cairo", "Tajawal", Arial, sans-serif;
}

/* حاوية الزر */
.course-success-button-wrap {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 25px;
}

/* الزر */
.course-success-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 40px;
    background-color: #0f5c49;
    color: #ffffff !important;
    text-decoration: none !important;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    transition: 0.3s ease;
    direction: rtl;
    font-family: "Cairo", "Tajawal", Arial, sans-serif;
}

.course-success-button:hover {
    background-color: #094536;
    transform: translateY(-2px);
}

/* إخفاء Back to form في Drupal */
.webform-confirmation__back,
a.webform-confirmation__back {
    display: none !important;
}
/* توسيط رسالة النجاح بالكامل */
.webform-confirmation {
    grid-column: 1 / -1 !important;
    width: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* الأيقونة */
.course-success-icon {
    margin: 30px auto 25px !important;
}

/* العنوان */
.course-success-heading {
    width: 100%;
    text-align: center;
}

/* الوصف */
.course-success-description {
    width: 100%;
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

/* الزر */
.course-success-button-wrap {
    width: 100%;
    display: flex;
    justify-content: center;
}
.course-success-heading{
    width: 100%;
    max-width: 650px;
    margin: 0 auto 18px;
    text-align: center;
    font-size: 34px;
    font-weight: 700;
    line-height: 1.4;
}
/* ============================= */
/* تحسين حقل رفع الملف */
/* ============================= */
.webform-submission-form input[type="file"] {
  border: 1.5px dashed #c9c2ae;
  font-size: 13px;
  color: #7a7264;
  cursor: pointer;
}

.webform-submission-form input[type="file"]:hover {
  border-color: #0f6b3a;
  background-color: #eceae2;
}

.webform-submission-form input[type="file"]:focus {
  outline: none;
  border-color: #0f6b3a;
  box-shadow: 0 0 0 3px rgba(15, 107, 58, 0.1);
}

/* زر اختيار الملف (Chrome/Edge/Safari) */
.webform-submission-form input[type="file"]::file-selector-button,
.webform-submission-form input[type="file"]::-webkit-file-upload-button {
  background-color: #0f6b3a;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  margin-inline-end: 12px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.webform-submission-form input[type="file"]::file-selector-button:hover,
.webform-submission-form input[type="file"]::-webkit-file-upload-button:hover {
  background-color: #0a4d2a;
}

.webform-element-description .file-upload-pills {
  list-style: none;
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 5px;
  margin: 10px 0 0;
  padding: 0;
}

.webform-element-description .file-upload-pills li {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background-color: #eef6f1;
  color: #0f6b3a;
  border: 1px solid #d7ebe0;
  border-radius: 16px;
  padding: 4px 8px;
  font-size: 10.5px;
  font-weight: 600;
  white-space: nowrap;
}

.webform-element-description .file-upload-pills li::before {
  content: "✓";
  color: #0f6b3a;
  font-weight: 700;
  font-size: 10px;
}
#edit-student-document--description {
  grid-column: auto !important;
  margin-bottom: 0;
}

#edit-student-document--description .file-upload-pills {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

#edit-student-document--description .file-upload-pills li {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background-color: #eef6f1;
  color: #0f6b3a;
  border: 1px solid #d7ebe0;
  border-radius: 16px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

#edit-student-document--description .file-upload-pills li::before {
  content: "✓";
  color: #0f6b3a;
  font-weight: 700;
  font-size: 10px;
}

/* ============================= */
/* تغميق لون النص في القوائم المنسدلة */
/* ============================= */
.webform-submission-form select {
  color: #4a4a4a;
}