/* ═══ DriverX page: "More than telematics" platform section ═══════════
   Linked after dx-page.css on driverx.html. A section head, then one
   row of four boxes: on the road, web portals, insight (each with a small
   illustrative screen) and the platform with its languages. On a phone the
   row becomes a sideways swipe, so the section stays short.
   The screens are drawn here in HTML and CSS; their colours come from the
   --s-* tokens on .dxp-ui so the same markup works in dark and light.
   ------------------------------------------------------------------ */

.dxp .dx-head { margin-bottom: 44px; }
.dxp-k { font-family: 'IBM Plex Mono', monospace; font-size: 10.5px; letter-spacing: .22em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 14px; }


/* ── the four boxes ── */
.dxp-row4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.dxp-row4:focus-visible { outline: 2px solid var(--lime); outline-offset: 4px; border-radius: 14px; }
.dxp-box { display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); padding: 10px 10px 16px;
           transition: border-color .35s var(--ease); }
.dxp-box:hover { border-color: rgba(179,210,48,.38); }
.dxp-box h3 { font-size: 17px; font-weight: 600; margin: 16px 8px 8px; }
.dxp-mods { list-style: none; margin: 0 8px; }
.dxp-mods li { display: grid; gap: 1px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 12.5px; line-height: 1.45; color: var(--text-dim); }
.dxp-mods b { font-size: 14px; font-weight: 500; color: var(--text); }
.dxp-cap { margin-top: 14px; text-align: right; font-family: 'IBM Plex Mono', monospace; font-size: 9.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--text-dim); }

/* the platform box: its tiles sit where the other boxes have a screen */
.dxp-box-plat .dxp-plat { order: -1; }
.dxp-plat { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; padding: 10px; border-radius: 10px; aspect-ratio: 5 / 4;
            align-content: center; background: radial-gradient(120% 90% at 50% 0%, rgba(179,210,48,.10) 0%, rgba(239,243,233,.02) 60%), rgba(239,243,233,.025); }
.dxp-plat li { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 9px 10px; border-radius: 9px; border: 1px solid var(--line); font-size: 12.5px; line-height: 1.25; color: var(--text); }
.dxp-plat svg { width: 17px; height: 17px; color: var(--lime); flex: none; }
.dxp-box-plat .dxp-k { margin: 2px 8px 8px; }
.dxp-langs { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0 8px; }
.dxp-langs li { padding: 4px 10px; border-radius: 100px; border: 1px solid var(--line); font-size: 12.5px; color: var(--text); }
.dxp-langs li[lang="ar"] { font-size: 14px; line-height: 1.25; border-color: rgba(179,210,48,.45); background: rgba(179,210,48,.08); }
.dxp-langs li.more { border-style: dashed; color: var(--text-dim); }

/* the stage: a window onto a device, cropped at the bottom like a product shot */
.dxp-stage { position: relative; aspect-ratio: 5 / 4; border-radius: 10px; overflow: hidden;
             background: radial-gradient(120% 90% at 50% 0%, rgba(179,210,48,.10) 0%, rgba(239,243,233,.02) 60%), rgba(239,243,233,.025); }
.dxp-phone { position: absolute; top: 9%; left: 50%; transform: translateX(-50%); width: 52%; aspect-ratio: 9 / 17; padding: 6px; border-radius: 24px;
             background: linear-gradient(158deg, #2A3125 0%, #11170E 46%, #060907 100%); border: 1px solid rgba(239,243,233,.16);
             box-shadow: 0 24px 50px rgba(0,0,0,.5); }
.dxp-phone .dxp-ui { border-radius: 18px; height: 100%; padding: 9px 10px; }
.dxp-web { position: absolute; top: 12%; left: 50%; transform: translateX(-50%); width: 88%; height: 100%; padding: 0; border-radius: 9px 9px 0 0; overflow: hidden;
           border: 1px solid rgba(239,243,233,.16); border-bottom: 0; box-shadow: 0 24px 50px rgba(0,0,0,.45); }
.dxp-web .dxp-ui { height: 100%; }

/* the screens: one small UI kit, themed by --s-* */
.dxp-ui { --s-bg: #0C120B; --s-panel: rgba(239,243,233,.055); --s-line: rgba(239,243,233,.10); --s-ink: #EFF3E9; --s-dim: rgba(239,243,233,.52);
          --s-acc: #B3D230; --s-acc-ink: #B3D230; --s-on: #0D1600; --s-cyan: #2EABC6;
          position: relative; background: var(--s-bg); color: var(--s-ink); font-size: 9px; line-height: 1.35; overflow: hidden; }
.dxp-ui b { font-weight: 600; }
.dxp-pbar, .dxp-wbar { display: flex; align-items: center; gap: 6px; font-family: 'IBM Plex Mono', monospace; font-size: 7px; letter-spacing: .16em;
                       text-transform: uppercase; color: var(--s-dim); }
.dxp-pbar { justify-content: space-between; padding: 4px 3px 8px; }
.dxp-pbar span, .dxp-meta { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dxp-pbar b, .dxp-wbar b { color: var(--s-acc-ink); font-weight: 500; }
.dxp-wbar { padding: 8px 12px; border-bottom: 1px solid var(--s-line); background: var(--s-panel); }
.dxp-wbar i { width: 6px; height: 6px; border-radius: 50%; background: var(--s-line); }
.dxp-wbar i:nth-child(3) { margin-right: 6px; }
.dxp-wbar span { margin-left: auto; }
.dxp-t { font-size: 11px; font-weight: 600; margin: 2px 3px 8px; }

/* POD */
.dxp-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; margin: 0 3px 8px; }
.dxp-photos i { aspect-ratio: 1; border-radius: 5px; background: linear-gradient(160deg, var(--s-panel), var(--s-line)); border: 1px solid var(--s-line); }
.dxp-photos i.add { display: grid; place-items: center; font-style: normal; font-size: 12px; color: var(--s-dim); background: none; border-style: dashed; }
.dxp-sig { display: block; width: 100%; height: auto; border-bottom: 1px dashed var(--s-line); margin-bottom: 5px; }
.dxp-sig path { fill: none; stroke: var(--s-ink); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 420; stroke-dashoffset: 420; }
.dxp-row4.in .dxp-sig path { animation: dxpSign 1.8s var(--ease) .5s forwards; }
@keyframes dxpSign { to { stroke-dashoffset: 0; } }
.dxp-meta { font-size: 7.5px; color: var(--s-dim); margin: 0 3px 9px; }
.dxp-btn { display: flex; align-items: center; justify-content: center; gap: 5px; margin: 0 3px; padding: 6px; border-radius: 100px;
           background: var(--s-acc); color: var(--s-on); font-weight: 600; font-size: 8.5px; }
.dxp-btn svg { width: 10px; height: 10px; }

/* customer shipments */
.dxp-ship { margin: 8px 12px 0; padding: 8px 9px; border-radius: 8px; background: var(--s-panel); border: 1px solid var(--s-line); }
.dxp-ship p:first-child { display: flex; justify-content: space-between; align-items: baseline; font-size: 7.5px; color: var(--s-dim); margin-bottom: 7px; }
.dxp-ship p:first-child b { font-size: 9px; color: var(--s-ink); }
.dxp-steps { display: grid; grid-template-columns: repeat(4, 1fr); align-items: center; position: relative; }
.dxp-steps::before { content: ""; position: absolute; left: 4px; right: 4px; top: 50%; height: 2px; margin-top: -1px; background: var(--s-line); }
.dxp-steps i { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--s-bg); border: 2px solid var(--s-line); }
.dxp-steps i:nth-child(2) { justify-self: center; transform: translateX(-30%); } .dxp-steps i:nth-child(3) { justify-self: center; transform: translateX(30%); }
.dxp-steps i:last-child { justify-self: end; }
.dxp-steps i.on { background: var(--s-acc); border-color: var(--s-acc); }
.dxp-steps i.now { border-color: var(--s-acc); box-shadow: 0 0 0 3px rgba(179,210,48,.2); }
.dxp-stl { display: flex; justify-content: space-between; margin-top: 5px; font-size: 6px; color: var(--s-dim); }
.dxp-pod { margin-top: 6px; font-size: 7px; color: var(--s-acc-ink); }

/* KPI report */
.dxp-kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; padding: 10px 12px 4px; }
.dxp-kpis span { display: grid; padding: 7px 8px; border-radius: 7px; background: var(--s-panel); border: 1px solid var(--s-line); font-size: 7.5px; color: var(--s-dim); }
.dxp-kpis b { font-size: 14px; color: var(--s-ink); letter-spacing: -.01em; }
.dxp-kpis span:first-child b { color: var(--s-acc-ink); }
.dxp-chart { display: block; width: calc(100% - 24px); height: 46%; margin: 8px 12px 0; }
.dxp-chart .g { fill: none; stroke: var(--s-line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.dxp-chart .b rect { fill: rgba(179,210,48,.32); transform-box: fill-box; transform-origin: bottom; transform: scaleY(.15); transition: transform 1s var(--ease); }
.dxp-row4.in .dxp-chart .b rect { transform: none; }
.dxp-chart .b rect:nth-child(even) { transition-delay: .08s; }
.dxp-chart .l { fill: none; stroke: var(--s-cyan); stroke-width: 2; stroke-linejoin: round; vector-effect: non-scaling-stroke; }

/* ── responsive: two by two on a tablet, a sideways swipe on a phone ── */
@media (max-width: 1080px) {
  .dxp-row4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dxp-stage, .dxp-plat { aspect-ratio: 16 / 10; }
  .dxp-phone { width: 40%; }
}
@media (max-width: 620px) {
  .dxp-row4 { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
              margin-left: -7vw; margin-right: -7vw; padding: 2px 7vw 10px; scroll-padding: 0 7vw; scrollbar-width: none; }
  .dxp-row4::-webkit-scrollbar { display: none; }
  .dxp-box { flex: 0 0 80%; scroll-snap-align: start; }
  .dxp-stage, .dxp-plat { aspect-ratio: 5 / 4; }
  .dxp-phone { width: 52%; }
  .dxp-cap { text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
  .dxp-sig path { stroke-dashoffset: 0; animation: none !important; }
  .dxp-chart .b rect { transform: none; transition: none; }
  .dxp-box { transition: none; }
}

/* ── light mode: white boxes, light screens, green text in place of lime on white ── */
html[data-theme="light"] .dxp-ui { --s-bg: #FFFFFF; --s-panel: #F6F7F5; --s-line: #E3E6E1; --s-ink: #12180F; --s-dim: #5C615B; --s-acc-ink: #467D00; }
html[data-theme="light"] .dxp-box { background: #FFFFFF; border-color: #E5E7E4; box-shadow: 0 4px 18px rgba(18, 24, 15, .04); }
/* label as the lime tags used on the SAP pages */
html[data-theme="light"] .dxp-box-plat .dxp-k { display: inline-block; align-self: flex-start; color: #12180F; background: #B3D230; padding: 2px 7px; border-radius: 4px; font-weight: 400; }
html[data-theme="light"] .dxp-box:hover { border-color: #B3D230; }
html[data-theme="light"] .dxp-mods li { border-color: #E5E7E4; }
html[data-theme="light"] .dxp-stage,
html[data-theme="light"] .dxp-plat { background: radial-gradient(120% 90% at 50% 0%, rgba(179,210,48,.16) 0%, #F3F5F1 62%); }
html[data-theme="light"] .dxp-plat li { background: #FFFFFF; border-color: #D5D8D3; }
html[data-theme="light"] .dxp-plat svg { color: #467D00; }
html[data-theme="light"] .dxp-phone { background: linear-gradient(158deg, #F0F2EE 0%, #E2E6DF 46%, #D5DAD0 100%); border-color: rgba(18, 24, 15, .14);
                                      box-shadow: 0 18px 40px rgba(18, 24, 15, .12); }
html[data-theme="light"] .dxp-web { border-color: #D5D8D3; box-shadow: 0 18px 40px rgba(18, 24, 15, .10); }
html[data-theme="light"] .dxp-langs li { border-color: #D5D8D3; }
html[data-theme="light"] .dxp-langs li[lang="ar"] { border-color: #B3D230; background: rgba(179,210,48,.12); }
html[data-theme="light"] .dxp-chart .b rect { fill: rgba(179,210,48,.55); }
