/* =====================================================================
   dm-track.css — شاشة حالة الطلب
   بتتحمّل بعد dm-addr.css

   بتتحقن في body زي أخواتها، يعني بره .dmw — فالكتلة الأولى بتعوّض
   الخط و reset الأزرار وحماية [hidden].

   كل الكلاسات بادئتها dmt-
   ===================================================================== */

.dmt-wrap[hidden] { display: none !important; }
.dmt-wrap { font-family: "Cairo", "Tajawal", "Segoe UI", sans-serif; }
.dmt-wrap button {
  font-family: inherit;
  -webkit-appearance: none; appearance: none;
  touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
.dmt-wrap button:focus-visible {
  outline: 3px solid var(--dm-info, #1F5C8C); outline-offset: 2px;
}

/* ======================================================== الحاوية
   دي مش شيت بيطلع من تحت — دي **الشاشة**. الزبون دفع، ومحتاج يشوف
   طلبه لا حاجة تانية. */
.dmt-wrap {
  position: fixed; inset: 0; z-index: 80;
  direction: rtl;
  background: var(--dm-bg, #F6F4F0);
  opacity: 0; transition: opacity .24s ease;
}
.dmt-wrap.is-open { opacity: 1; }

.dmt-sheet {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  max-width: 520px; margin: 0 auto;
  background: var(--dm-bg, #F6F4F0);
}

/* --------------------------------------------------------- الهيدر */
.dmt-head {
  flex: none;
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 14px;
  padding: 20px 18px 16px;
  background: var(--dm-primary, #2C2724);
  color: #fff;
}
.dmt-head h2 { margin: 0; font-size: 23px; font-weight: 800; line-height: 1.3; }
.dmt-head p  { margin: 4px 0 0; font-size: 13.5px; opacity: .78; }

.dmt-x {
  width: 36px; height: 36px; flex: none;
  display: grid; place-items: center;
  background: rgba(255,255,255,.12); border: 0; border-radius: 10px;
  cursor: pointer; color: #fff;
}
.dmt-x svg { width: 17px; height: 17px; fill: none; stroke: currentColor;
             stroke-width: 2.4; stroke-linecap: round; }

/* ---------------------------------------------------------- الجسم */
.dmt-body {
  flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 16px 16px calc(24px + env(safe-area-inset-bottom, 0px));
}

.dmt-load { display: grid; place-items: center; padding: 60px 0; }
.dmt-load span {
  width: 26px; height: 26px;
  border: 3px solid var(--dm-border, #E6E2DA);
  border-top-color: var(--dm-accent, #D2701E);
  border-radius: 50%;
  animation: dmt-spin .8s linear infinite;
}
@keyframes dmt-spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------ الحالة دلوقتي */
.dmt-now {
  background: var(--dm-surface, #fff);
  border: 1px solid var(--dm-border, #E6E2DA);
  border-radius: 14px;
  padding: 18px 16px;
  text-align: center;
}
.dmt-now p { margin: 0; font-size: 15.5px; color: var(--dm-text, #201D19); line-height: 1.7; }
.dmt-eta {
  margin-top: 6px !important;
  font-size: 13.5px !important;
  color: var(--dm-text-secondary, #6E6A62) !important;
}

.dmt-now.is-done {
  background: var(--dm-primary, #2C2724);
  border-color: var(--dm-primary, #2C2724);
}
.dmt-now.is-done p { color: #fff; }

/* الملغي بيغور — الفرق إضاءة مش لون */
.dmt-now.is-dead {
  background: var(--dm-surface-sunken, #EFECE5);
  border-color: var(--dm-border-strong, #DCD7CE);
  border-style: dashed;
}
.dmt-now.is-dead p { color: var(--dm-text-secondary, #6E6A62); }

.dmt-big {
  display: grid; place-items: center;
  width: 54px; height: 54px; margin: 0 auto 10px;
  background: rgba(255,255,255,.14); border-radius: 50%;
}
.dmt-big svg { width: 28px; height: 28px; fill: none; stroke: #fff;
               stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }

/* ------------------------------------------------------- الخطوات */
.dmt-steps {
  list-style: none; margin: 18px 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr);
  position: relative;
}
/* الخط اللي بيوصل بينهم */
.dmt-steps::before {
  content: ""; position: absolute;
  top: 15px; inset-inline: 12.5%;
  height: 2px; background: var(--dm-border, #E6E2DA);
}
.dmt-steps li {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.dmt-dot {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  background: var(--dm-bg, #F6F4F0);
  border: 2px solid var(--dm-border-strong, #DCD7CE);
  border-radius: 50%;
  font-size: 13px; font-weight: 800;
  color: var(--dm-text-disabled, #A8A197);
}
.dmt-dot svg { width: 15px; height: 15px; fill: none; stroke: currentColor;
               stroke-width: 3.4; stroke-linecap: round; stroke-linejoin: round; }
.dmt-slb {
  font-size: 11.5px; font-weight: 700; text-align: center;
  color: var(--dm-text-disabled, #A8A197);
}

/* الخطوة اللي خلصت: معبّاية. اللي دلوقتي: معبّاية + حلقة حواليها.
   التلاتة مختلفين في الإضاءة والشكل، مش في اللون. */
.dmt-steps li.is-done .dmt-dot {
  background: var(--dm-primary, #2C2724);
  border-color: var(--dm-primary, #2C2724);
  color: #fff;
}
.dmt-steps li.is-done .dmt-slb { color: var(--dm-text-secondary, #6E6A62); }

.dmt-steps li.is-now .dmt-dot {
  background: var(--dm-accent, #D2701E);
  border-color: var(--dm-accent, #D2701E);
  color: var(--dm-on-accent, #FFF6EC);
  box-shadow: 0 0 0 4px var(--dm-image-bg, #F1EDE6);
  animation: dmt-beat 1.8s ease-in-out infinite;
}
.dmt-steps li.is-now .dmt-slb { color: var(--dm-text, #201D19); font-weight: 800; }
@keyframes dmt-beat { 50% { transform: scale(1.08); } }

/* --------------------------------------------------------- الأقسام */
.dmt-sec { margin-top: 20px; }
.dmt-sec > h3 {
  margin: 0 0 9px;
  font-size: 15px; font-weight: 800;
  color: var(--dm-text, #201D19);
}

.dmt-lines {
  background: var(--dm-surface, #fff);
  border: 1px solid var(--dm-border, #E6E2DA);
  border-radius: 13px;
  overflow: hidden;
}
.dmt-line {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--dm-border, #E6E2DA);
}
.dmt-line:last-child { border-bottom: 0; }

.dmt-q {
  flex: none; min-width: 26px;
  font-size: 15px; font-weight: 800; color: var(--dm-text, #201D19);
}
.dmt-nm {
  flex: 1; min-width: 0;
  font-size: 15px; font-weight: 700; color: var(--dm-text, #201D19);
  line-height: 1.5;
}
.dmt-op {
  display: block; margin-top: 2px;
  font-size: 12.5px; font-weight: 400; line-height: 1.6;
  color: var(--dm-text-secondary, #6E6A62);
}
.dmt-pr { flex: none; font-size: 14.5px; font-weight: 800; color: var(--dm-text, #201D19); }

.dmt-sum {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 0 4px; margin-top: 8px;
  font-size: 14px; color: var(--dm-text-secondary, #6E6A62);
}
.dmt-grand {
  margin-top: 10px; padding-top: 10px;
  border-top: 1px solid var(--dm-border, #E6E2DA);
  font-size: 16px;
}
.dmt-grand b { font-size: 22px; font-weight: 800; color: var(--dm-text, #201D19); }

/* --------------------------------------------------------- العنوان */
.dmt-addr {
  display: flex; align-items: flex-start; gap: 10px;
  background: var(--dm-surface, #fff);
  border: 1px solid var(--dm-border, #E6E2DA);
  border-radius: 13px;
  padding: 14px 15px;
  font-size: 14.5px; line-height: 1.7;
  color: var(--dm-text, #201D19);
}
.dmt-addr svg {
  width: 19px; height: 19px; flex: none; margin-top: 2px;
  fill: none; stroke: var(--dm-text-secondary, #6E6A62);
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.dmt-addr small {
  display: block; margin-top: 2px;
  font-size: 12.5px; color: var(--dm-text-secondary, #6E6A62);
}

/* ------------------------------------------------------ اطلب تاني */
.dmt-again {
  width: 100%; min-height: 54px; margin-top: 22px;
  background: var(--dm-accent, #D2701E);
  color: var(--dm-on-accent, #FFF6EC);
  border: 0; border-radius: 14px;
  font-size: 17px; font-weight: 800; cursor: pointer;
  transition: background .18s ease, transform .12s ease;
}
.dmt-again:hover { background: var(--dm-accent-hover, #B85F14); }
.dmt-again:active { transform: scale(.985); }

@media (prefers-reduced-motion: reduce) {
  .dmt-wrap, .dmt-load span, .dmt-steps li.is-now .dmt-dot {
    transition: none !important; animation: none !important;
  }
}