/* الصندوق */
#sh-box {
  background: #f9f9fa;
  border: 1.5px solid #b4b8c1;
  border-radius: 9px;
  padding: 14px 12px;
  max-width: 900px;
  width: 100%;
  margin: 12px auto 18px;
  box-shadow: 0 5px 18px -5px rgba(180, 184, 193, 0.3);
}

/* عنوان الشريط */
#sh-box .sh-title {
  margin-bottom: 12px;
  color: #198238;          /* أخضر */
  font-weight: 700;        /* Bold */
  font-size: 20px;
  text-align: center;
}

/* صف المنسدلات - شبكة مرنة Fully Responsive */
#sh-box .sh-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 12px;
  align-items: center;
  justify-items: stretch;
  margin-bottom: 10px;
}

/* القوائم */
#sh-box select {
  width: 100%;
  min-width: 0;            /* للسماح بالانكماش داخل الشبكة */
  padding: 8px 12px;
  border: 1px solid #bbb;
  border-radius: 6px;
  background: #fff;
  font-size: 15px;
  color: #000000;          /* لون النص داخل المربع الأخضر */
  font-weight: 700;        /* Bold */
  transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}

#sh-box select:disabled {
  opacity: .55;
}

#sh-box select:focus {
  outline: none;
  border-color: #198238;
  box-shadow: 0 0 0 3px rgba(25, 130, 56, 0.15);
}

/* النتائج */
#sh-results {
  text-align: right;
  padding-top: 6px;
  word-wrap: break-word;
}

#sh-results ul {
  list-style: disc;
  padding-right: 22px;
  margin: 6px 0 0;
}

#sh-results li {
  margin-bottom: 5px;
  line-height: 1.5;
}

#sh-results a {
  color: #1976d2;
  text-decoration: none;
  font-weight: 600;
}

#sh-results a:hover {
  color: #c00;
  text-decoration: underline;
}

/* عنوان نتائج كل مستوى */
.sh-results-box h3 {
  margin: 0 0 6px 0;
  font-size: 17px;
  color: #198238;          /* أخضر */
  font-weight: 700;        /* Bold */
}

.sh-loading {
  text-align: center;
  color: #2563eb;
  font-size: 15px;
}

/* إبقاء الهيدر والفوتر مرئيين عند عرض النتائج */
body.sh-results-only header,
body.sh-results-only #site-header,
body.sh-results-only #masthead {
  display: block !important;
}
body.sh-results-only footer,
body.sh-results-only #site-footer,
body.sh-results-only #colophon {
  display: block !important;
}

/* إخفاء مناطق المحتوى فقط والإبقاء على الشريط والنتائج */
body.sh-results-only .content-area,
body.sh-results-only .site-content,
body.sh-results-only #primary,
body.sh-results-only #main,
body.sh-results-only .posts,
body.sh-results-only .post,
body.sh-results-only .entry,
body.sh-results-only .pagination,
body.sh-results-only .navigation,
body.sh-results-only .widget-area,
body.sh-results-only .sidebar {
  display: none !important;
}

/* ---------- Responsiveness ---------- */
@media (max-width: 1200px) {
  #sh-box .sh-row { grid-template-columns: repeat(3, minmax(160px, 1fr)); }
}

@media (max-width: 900px) {
  #sh-box { padding: 12px; }
  #sh-box .sh-title { font-size: 19px; }
  #sh-box .sh-row { grid-template-columns: repeat(2, minmax(150px, 1fr)); gap: 10px; }
  #sh-box select { padding: 9px 12px; font-size: 15px; }
}

@media (max-width: 520px) {
  #sh-box .sh-row { grid-template-columns: 1fr; gap: 10px; }
  #sh-box { border-radius: 10px; }
  #sh-box .sh-title { font-size: 18px; }
  #sh-box select { padding: 10px 12px; font-size: 16px; } /* لمس مريح */
  #sh-results li { line-height: 1.6; }
}