#ita3d-modal, #ita3d-modal * { box-sizing: border-box; }
.ita3d-no-scroll { overflow: hidden !important; }
.ita3d-modal {
  position: fixed; inset: 0; z-index: 999999;
  display: none; align-items: center; justify-content: center;
  padding: 18px; background: rgba(8, 15, 25, .78);
  direction: rtl; font-family: Tahoma, Arial, sans-serif;
}
.ita3d-modal.is-open { display: flex; }
.ita3d-dialog {
  width: min(1200px, 100%); height: min(820px, 94vh);
  display: flex; flex-direction: column; overflow: hidden;
  background: #fff; border-radius: 14px; box-shadow: 0 18px 70px rgba(0,0,0,.35);
}
.ita3d-header {
  min-height: 66px; padding: 10px 16px; display: flex; align-items: center;
  justify-content: space-between; gap: 12px; border-bottom: 1px solid #e8edf2;
}
.ita3d-heading { min-width: 150px; display: flex; flex-direction: column; gap: 5px; }
.ita3d-heading strong { color: #17212b; font-size: 15px; }
.ita3d-heading span { color: #64748b; font-size: 11px; }
.ita3d-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ita3d-actions button {
  border: 1px solid #d8e0e8; border-radius: 7px; padding: 8px 11px;
  background: #fff; color: #334155; font: 12px Tahoma, Arial, sans-serif; cursor: pointer;
}
.ita3d-actions button:hover, .ita3d-actions button.is-active {
  background: #173d36; border-color: #173d36; color: #fff;
}
.ita3d-actions .ita3d-close {
  width: 34px; height: 34px; padding: 0; font-size: 24px; line-height: 1;
  background: #fff5f3; color: #c0392b; border-color: #f2d3cd;
}
.ita3d-stage { position: relative; flex: 1; min-height: 0; background: #dce5eb; }
.ita3d-map { position: absolute; inset: 0; }
.ita3d-map.is-profile { bottom: 190px; }
.ita3d-loading, .ita3d-error {
  position: absolute; z-index: 20; top: 14px; left: 50%; transform: translateX(-50%);
  padding: 10px 16px; border-radius: 8px; background: rgba(15,23,42,.88);
  color: #fff; font-size: 12px; max-width: 90%; text-align: center;
}
.ita3d-error { top: 55px; background: #991b1b; }
.ita3d-profile {
  position: absolute; z-index: 10; bottom: 0; left: 0; right: 0; height: 190px;
  padding: 10px 16px 8px; background: rgba(255,255,255,.97);
  border-top: 1px solid #dce3e9;
}
.ita3d-profile[hidden] { display: none !important; }
.ita3d-profile-head { display: flex; justify-content: space-between; gap: 10px; color: #334155; font-size: 12px; }
.ita3d-profile-head span { color: #64748b; font-size: 11px; }
#ita3d-chart { display: block; width: 100%; height: 145px; }
.ita3d-footer {
  min-height: 35px; display: flex; align-items: center; gap: 20px;
  padding: 7px 15px; border-top: 1px solid #e8edf2; color: #64748b; font-size: 11px;
}
.ita3d-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 4px; }
.ita3d-dot.start { background: #65a30d; }
.ita3d-dot.end { background: #dc2626; }
.ita3d-footer span:last-child { margin-right: auto; }
@media (max-width: 700px) {
  .ita3d-modal { padding: 0; }
  .ita3d-dialog { width: 100%; height: 100%; max-height: 100%; border-radius: 0; }
  .ita3d-header { align-items: flex-start; flex-direction: column; padding: 10px; gap: 9px; }
  .ita3d-heading { gap: 3px; }
  .ita3d-actions { width: 100%; gap: 5px; }
  .ita3d-actions button { flex: 1; padding: 8px 5px; font-size: 11px; }
  .ita3d-actions .ita3d-close { flex: 0 0 34px; }
  .ita3d-footer { gap: 10px; font-size: 10px; flex-wrap: wrap; }
  .ita3d-map.is-profile { bottom: 175px; }
  .ita3d-profile { height: 175px; padding: 8px; }
  #ita3d-chart { height: 130px; }
}
