/* Logistics tracking inside standalone client dashboard */
.dx-app-content .dx-logistics-track,
.dx-app-content .dx-track.dx-logistics-track {
  width: 100% !important;
  max-width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow-x: hidden;
}

.dx-logistics-toolbar,
.dx-logistics-toolbar h2 {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.dx-app-content .dx-track,
.dx-app-content .dx-results,
.dx-app-content .dx-grid {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.dx-app-content .dx-logistics-track.dx-track > *:not(.dx-hero):not(.dx-results):not(#dxError):not(.dx-logistics-toolbar) {
  display: block !important;
}

.dx-logistics-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.dx-logistics-toolbar h2 {
  margin: 0;
  font-size: 22px;
}

.dx-logistics-toolbar__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dx-logistics-track .dx-hero {
  display: none !important;
}

.dx-logistics-track .dx-results {
  margin-top: 0 !important;
}

.dx-logistics-track .dx-topbar,
.dx-logistics-track .dx-card {
  padding: 14px;
  border-radius: 16px;
  background: var(--dx-card, #151f31);
  border: 1px solid var(--dx-border, rgba(255, 255, 255, 0.08));
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
}

.dx-progressRow--logistics {
  margin-bottom: 10px;
}

.dx-progressPct {
  font-size: 13px;
  font-weight: 800;
  color: #22c55e;
  text-align: center;
  margin-top: 4px;
}

.dx-progressLabel--center {
  text-align: center;
  flex: 1;
}

.dx-logistics-track .dx-card--map {
  min-height: 0;
  height: auto;
  padding-bottom: 12px;
}

.dx-logistics-track .dx-map {
  height: 300px;
  min-height: 0;
  max-height: 52vh;
}

.dx-thumb-placeholder {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
  text-align: center;
  padding: 8px;
}

.dx-image-field {
  margin: 16px 0;
  padding: 14px;
  border-radius: 14px;
  border: 1px dashed rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.03);
}

.dx-image-field label {
  display: block;
  font-weight: 700;
  margin-bottom: 10px;
}

.dx-image-field__preview {
  width: 100%;
  max-width: 280px;
  min-height: 140px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}

.dx-image-field__preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.dx-image-field__placeholder {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
  padding: 12px;
  text-align: center;
}

.dx-image-field__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dx-dash-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

@media (max-width: 900px) {
  .dx-logistics-track .dx-map {
    height: min(44vh, 300px) !important;
    min-height: 0 !important;
  }
}

@media (max-width: 768px) {
  /* Single gutter on app content only — inner track has zero side padding */
  body.dx-app-body .dx-app-content,
  .dx-app-content {
    width: 100% !important;
    max-width: 100% !important;
    padding-top: 14px !important;
    padding-bottom: 14px !important;
    padding-left: 5vw !important;
    padding-right: 5vw !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box !important;
  }

  body.dx-app-body .dx-app-content .dx-logistics-track,
  body.dx-app-body .dx-app-content .dx-track,
  .dx-app-content .dx-logistics-track,
  .dx-app-content .dx-track,
  .dx-app-content .dx-track.dx-logistics-track {
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
  }

  body.dx-app-section-shipment .dx-app-content {
    padding-left: 5vw !important;
    padding-right: 5vw !important;
  }

  .dx-logistics-track .dx-topbar,
  .dx-logistics-track .dx-card,
  .dx-logistics-track .dx-results,
  .dx-logistics-track .dx-grid,
  .dx-logistics-track .dx-side,
  .dx-logistics-track .dx-hero {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding: 14px !important;
    border-radius: 16px !important;
    box-sizing: border-box !important;
  }
}

@media (max-width: 640px) {
  .dx-app-content {
    padding-left: 5vw !important;
    padding-right: 5vw !important;
    padding-top: 12px !important;
    padding-bottom: 12px !important;
  }

  .dx-logistics-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .dx-logistics-toolbar__actions {
    width: 100%;
  }

  .dx-logistics-toolbar__actions .dx-dash-btn {
    flex: 1 1 100%;
    text-align: center;
    min-width: 0;
  }

  .dx-logistics-track .dx-map,
  .dx-logistics-track .leaflet-container {
    width: 100% !important;
    max-width: 100% !important;
  }

  .dx-logistics-track .dx-timeline li {
    word-break: break-word;
    overflow-wrap: anywhere;
  }
}

/* =========================================================
   Track Parcel — footer matches homepage (Elementor template 167)
   Do NOT restyle the footer here; only prevent tracking bleed overrides.
   Homepage and track-parcel both use elementor-167 + post-167.css.
   ========================================================= */

body.dx-has-tracking .dx-tracking-page-wrapper {
  margin-bottom: clamp(24px, 4vw, 48px) !important;
}

body.dx-has-tracking footer {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  clear: both !important;
}
