/* Directory motion and the two camera modes. */
/* مساحة العمل: عرض الدليل بجانب الماب وتحريك توزيع الأعمدة. */
.workspace {
  --directory-width: 365px;
  display: grid;
  grid-template-columns: var(--directory-width) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  transition: grid-template-columns 360ms cubic-bezier(0.22, 1, 0.36, 1);
}
/* إخفاء عمود الدليل لتتسع مساحة الخريطة. */
.workspace.directory-hidden {
  grid-template-columns: 0px minmax(0, 1fr);
}
/* عرض الدليل وحركة انزلاقه. */
.sidebar {
  width: var(--directory-width);
  min-width: 0;
  min-height: 0;
  transition:
    transform 360ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 240ms ease;
}
/* إزاحة الدليل خارج الشاشة مع منع الضغط عليه وهو مخفي. */
.directory-hidden .sidebar {
  transform: translateX(100%);
  opacity: 0;
  pointer-events: none;
}
/* الزر الذي يبقى ظاهرًا فوق الماب لإرجاع الدليل. */
.directory-toggle {
  position: absolute;
  z-index: 9;
  right: 24px;
  top: 88px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  direction: rtl;
  color: #0a6cf0;
  background: #fffffff2;
  border: 1px solid #dce5f1;
  border-radius: 9px;
  font-size: 12px;
  transition:
    background 180ms ease,
    transform 180ms ease;
}
/* تمييز مرور المؤشر فوق الزر. */
.directory-toggle:hover {
  background: #edf4ff;
}
/* رد فعل بصري عند الضغط. */
.directory-toggle:active {
  transform: scale(0.97);
}
/* تمييز زر الإغلاق داخل الدليل. */
.directory-close:hover {
  color: #0a6cf0;
  background: #edf4ff;
}
/* إعادة قراءة الأماكن بعد تعديل الملف؛ الزر موجود بجانب زر إغلاق الدليل. */
.places-refresh {
  color: #0a6cf0;
  flex-shrink: 0;
}
.places-refresh:hover {
  background: #edf4ff;
}
/* تنسيق زر وضع العرض 3D أو 2D. */
.map-controls .dimension-toggle {
  direction: ltr;
  font:
    700 13px/1 Arial,
    sans-serif;
  color: #0a6cf0;
}
/* اللون الأزرق يدل على أن وضع 3D مفعل. */
.map-controls .dimension-toggle[aria-pressed="true"] {
  color: #fff;
  background: #0a6cf0;
}
/* لون سلايدر الدوران. */
.camera-panel input {
  accent-color: #0a6cf0;
}
/* عرض الدليل على الشاشات الكبيرة. */
@media (min-width: 1600px) {
  .workspace {
    --directory-width: 400px;
  }
}
/* تقليل عرض الدليل على اللابتوب. */
@media (max-width: 1100px) {
  .workspace {
    --directory-width: 330px;
  }
}
/* على الموبايل: الدليل يغطي الماب وينزلق عند فتحه وإغلاقه. */
@media (max-width: 767px) {
  .workspace,
  .workspace.directory-hidden {
    display: flex;
  }
  .sidebar {
    width: 100%;
    display: flex;
    opacity: 0;
    transform: translateX(100%);
    pointer-events: none;
    visibility: hidden;
    transition:
      transform 360ms cubic-bezier(0.22, 1, 0.36, 1),
      opacity 240ms ease,
      visibility 360ms;
  }
  .sidebar.mobile-open {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
  }
  .directory-close,
  .directory-toggle {
    display: none;
  }
  .map-controls .dimension-toggle {
    font-size: 11px;
  }
}
/* احترام إعداد النظام لتقليل الحركة. */
@media (prefers-reduced-motion: reduce) {
  .workspace,
  .sidebar,
  .directory-toggle {
    transition: none;
  }
}

/* أثناء أخذ الإحداثيات، تمر الضغطة عبر ملصقات الأماكن إلى سطح الماب. */
.coordinate-picking .cesium-shim-overlay * {
  pointer-events: none !important;
}
.coordinate-picked-dot {
  z-index: 15;
}
.coordinate-picker {
  position: absolute;
  z-index: 10;
  right: 24px;
  top: 138px;
  width: 286px;
  direction: rtl;
}
.coordinate-picker-toggle {
  display: flex;
  align-items: center;
  gap: 7px;
  width: max-content;
  margin-left: auto;
  background: #fff;
  color: #0a6cf0;
  border: 1px solid #dce5f1;
  border-radius: 9px;
  padding: 9px 12px;
  font-size: 12px;
  transition:
    background 180ms ease,
    color 180ms ease;
}
.coordinate-picker-toggle[aria-pressed="true"] {
  color: #fff;
  background: #0a6cf0;
  border-color: #0a6cf0;
}
.coordinate-picker-panel {
  margin-top: 8px;
  padding: 14px;
  border-radius: 12px;
  background: #fffffff5;
  border: 1px solid #dce5f1;
  box-shadow: 0 8px 24px #15346012;
}
.coordinate-picker-panel strong {
  font-size: 14px;
}
.coordinate-picker-panel p {
  margin-top: 5px;
  color: #66758b;
  font-size: 12px;
  line-height: 1.9;
}
.coordinate-picker-panel label {
  display: block;
  margin: 12px 0 5px;
  font-size: 11px;
  color: #66758b;
}
.coordinate-output {
  display: block;
  width: 100%;
  padding: 9px 7px;
  border: 1px solid #cedcef;
  border-radius: 6px;
  color: #17457d;
  background: #f4f8ff;
  font:
    11px/1.6 Consolas,
    monospace;
}
.coordinate-copy {
  margin-top: 9px;
  border-radius: 7px;
  background: #0a6cf0;
  color: #fff;
  width: 100%;
  padding: 8px;
  font-size: 12px;
}
.coordinate-copy:hover {
  background: #095dce;
}
@media (max-width: 767px) {
  .coordinate-picker {
    top: 58px;
    right: 10px;
    width: min(286px, calc(100% - 62px));
  }
  .coordinate-picker-toggle {
    font-size: 11px;
    padding: 8px 10px;
  }
  .coordinate-picker-panel {
    padding: 11px;
  }
}
