/* Yabisela Stores tracking: the map fills the screen, the panel holds the story of the order. Pins and the moto are shared
   with the seller's order page (track.js). */

/* ---------- map markers ---------- */
.tk-pin span { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50% 50% 50% 6px; transform: rotate(-45deg); box-shadow: 0 8px 18px rgb(0 20 70 / .35); border: 3px solid #fff; }
.tk-pin .ic { transform: rotate(45deg); width: 20px; height: 20px; stroke-width: 2.2; }
.tk-shop span { background: var(--navy); color: var(--yellow); }
.tk-home span { background: var(--yellow); color: var(--navy); }
.tk-rider span { position: absolute; inset: 7px; border-radius: 50%; background: var(--yellow); color: var(--navy); display: grid; place-items: center; border: 3px solid var(--navy); box-shadow: 0 10px 22px rgb(0 20 70 / .4); }
.tk-rider .ic { width: 24px; height: 24px; stroke-width: 2.1; }
.tk-rider .ring { position: absolute; inset: 0; border-radius: 50%; background: rgb(254 211 8 / .45); opacity: 0; }
.tk-moving .tk-rider .ring { animation: ring 2.2s ease-out infinite; }
.tk-moving .tk-rider .r2 { animation-delay: 1.1s; }
@keyframes ring { 0% { transform: scale(.6); opacity: .9; } 100% { transform: scale(1.9); opacity: 0; } }
.tk-done .tk-rider { display: none; }
.leaflet-container { font: inherit; background: #e9eef6; }
.leaflet-tile-pane { filter: saturate(.45) brightness(1.04) contrast(.96); }
.leaflet-tooltip { font: 600 12.5px var(--font); color: var(--ink); border: 0; border-radius: 10px; box-shadow: 0 8px 20px rgb(0 20 70 / .18); padding: 7px 11px; }
.leaflet-control-zoom a { color: var(--navy) !important; }

/* ---------- the page ---------- */
body.trk-page { padding-bottom: 0; }
main.trk { padding-top: 0; }
.trk { display: grid; grid-template-columns: 1fr 440px; height: calc(100vh - 64px); height: calc(100dvh - 64px); }
.trk-map { position: relative; }
#map { position: absolute; inset: 0; }
.trk-eta { position: absolute; z-index: 500; left: 20px; top: 20px; display: flex; align-items: center; gap: 12px; padding: 12px 18px 12px 14px; border-radius: 18px; background: var(--navy); color: #fff; box-shadow: 0 14px 30px rgb(0 20 70 / .3); }
.trk-eta small { display: block; font-size: 11.5px; opacity: .75; }
.trk-eta b { display: block; font-size: 20px; color: var(--yellow); }
.pulse { width: 12px; height: 12px; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 0 0 rgb(254 211 8 / .7); animation: pulse 1.8s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 12px rgb(254 211 8 / 0); } 100% { box-shadow: 0 0 0 0 rgb(254 211 8 / 0); } }
.trk-fit { position: absolute; z-index: 500; right: 12px; top: 20px; width: 44px; height: 44px; border-radius: 12px; background: #fff; color: var(--navy); display: grid; place-items: center; box-shadow: 0 6px 16px rgb(0 20 70 / .18); }

.trk-panel { background: #fff; overflow-y: auto; padding: 26px 26px 34px; display: grid; gap: 18px; align-content: start; box-shadow: -1px 0 0 var(--line); }
.trk-grip { display: none; }
.trk-no { font-size: 12.5px; font-weight: 700; color: var(--blue); letter-spacing: .04em; }
.trk-hd h1 { font-size: clamp(28px, 2.6vw, 36px); font-weight: 800; letter-spacing: -.025em; line-height: 1.05; margin-top: 4px; }
.trk-sub { color: var(--ink-2); margin-top: 6px; line-height: 1.45; }
.trk-bar { height: 8px; border-radius: 8px; background: var(--tint-2); margin-top: 16px; overflow: hidden; }
.trk-bar i { display: block; height: 100%; width: 0; border-radius: 8px; background: linear-gradient(90deg, var(--navy), var(--blue)); transition: width .9s cubic-bezier(.4, 0, .2, 1); position: relative; }
.trk-bar i::after { content: ''; position: absolute; right: 0; top: 0; bottom: 0; width: 8px; border-radius: 8px; background: var(--yellow); }

.trk-near { display: flex; gap: 14px; align-items: center; padding: 14px 16px; border-radius: 16px; background: #fff4d1; color: #6d4c00; animation: rise .5s cubic-bezier(.3, 1.4, .5, 1) both; }
.trk-near .ic { width: 30px; height: 30px; color: var(--navy); }
.trk-near b { display: block; color: var(--ink); }
.trk-near small { font-size: 12.5px; }
@keyframes rise { from { transform: translateY(8px); opacity: 0; } }

.trk-shop { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-block: 1px solid var(--line); }
.trk-shop .mono { width: 44px; height: 44px; border-radius: 50%; background: var(--a); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 14px; flex: none; }
.trk-shop b { display: block; }
.trk-shop small { color: var(--ink-3); font-size: 12.5px; }
.trk-shop .b { margin-left: auto; }

.trk-steps h2, .trk-log h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); margin-bottom: 12px; display: flex; align-items: center; gap: 10px; }
.trk-steps ol { list-style: none; margin: 0; padding: 0; }
.trk-steps li { display: flex; gap: 14px; position: relative; padding-bottom: 16px; }
.trk-steps li:last-child { padding-bottom: 0; }
.trk-steps li::before { content: ''; position: absolute; left: 13px; top: 28px; bottom: 0; width: 2px; background: var(--line); }
.trk-steps li.done::before { background: var(--navy); }
.trk-steps li:last-child::before { display: none; }
.trk-steps li > i { width: 28px; height: 28px; border-radius: 50%; border: 2px solid #c9d3ea; background: #fff; flex: none; display: grid; place-items: center; position: relative; z-index: 1; }
.trk-steps li.done > i { background: var(--navy); border-color: var(--navy); color: var(--yellow); }
.trk-steps li.cur > i { border-color: var(--yellow); box-shadow: 0 0 0 5px rgb(254 211 8 / .3); animation: pulse 1.8s infinite; }
.trk-steps li > i .ic { width: 15px; height: 15px; stroke-width: 3; }
.trk-steps b { display: block; font-size: 14px; color: var(--ink-3); font-weight: 600; }
.trk-steps li.done b, .trk-steps li.cur b { color: var(--ink); }
.trk-steps small { font-size: 12px; color: var(--ink-3); }

.live { display: inline-flex; align-items: center; gap: 6px; text-transform: none; letter-spacing: 0; font-size: 11.5px; color: #12804a; background: #e2f6e9; padding: 3px 9px; border-radius: 999px; }
.live i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: blink 1.4s infinite; }
@keyframes blink { 50% { opacity: .25; } }
.trk-log ul { display: grid; gap: 4px; }
.trk-log li { display: flex; gap: 12px; align-items: flex-start; padding: 9px 10px; border-radius: 12px; }
.trk-log li.new { animation: flash 2.4s ease-out; }
@keyframes flash { 0% { background: #fff4d1; } 100% { background: transparent; } }
.trk-log li > i { width: 30px; height: 30px; border-radius: 10px; background: var(--tint); color: var(--blue); display: grid; place-items: center; flex: none; }
.trk-log li > i .ic { width: 16px; height: 16px; }
.trk-log .k-position { background: #fff4d1; color: #8a6100; }
.trk-log b { display: block; font-size: 13.5px; }
.trk-log small { color: var(--ink-2); font-size: 12.5px; }
.trk-log time { margin-left: auto; font-size: 11.5px; color: var(--ink-3); white-space: nowrap; }

@media (max-width: 900px) {
  .trk { display: block; height: auto; }
  .trk-map { height: 56vh; height: 56dvh; position: sticky; top: 56px; }
  .trk-panel { position: relative; z-index: 600; margin-top: -26px; border-radius: 26px 26px 0 0; box-shadow: 0 -10px 30px rgb(0 20 70 / .15); padding: 12px 18px 100px; overflow: visible; }
  .trk-grip { display: block; width: 44px; height: 5px; border-radius: 5px; background: #d5dcec; margin: 0 auto 6px; }
  .trk-eta { left: 12px; top: 12px; padding: 9px 14px 9px 12px; }
  .trk-eta b { font-size: 17px; }
  .trk-fit { top: 12px; }
}
