/* SMAU FILE
 * Path: css/smau-mapsPip.css
 * Owns: the Maps picture-in-picture floating mini-map (js/smau.mapsPip.js).
 * A draggable window above apps, below system-critical overlays (calls, the
 * switch curtain). Theme-neutral dark glass so it reads over any app.
 */

#smau-maps-pip {
  position: absolute;
  width: 148px;
  z-index: 250;
  display: none;
  flex-direction: column;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  overflow: hidden;
  background: rgba(16, 20, 30, 0.96);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5);
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  animation: mapsPipIn 220ms cubic-bezier(0.2, 0.9, 0.24, 1.02);
}
#smau-maps-pip[data-state="open"] { display: flex; }
#smau-maps-pip:active { cursor: grabbing; }

@keyframes mapsPipIn {
  from { opacity: 0; transform: scale(0.86) translateY(8px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  #smau-maps-pip { animation: none; }
}

/* The mini-map surface mirrors css/app-maps.css .maps-background so the PiP
   reads as the real map, just smaller. Roads/park/water sit at the same
   coordinates the route snaps to (ROADS.mainAveY ~43%, grandBlvdX ~60%). */
#smau-maps-pip .pip-map {
  position: relative;
  height: 104px;
  overflow: hidden;
  background-color: #e8eaed;
  background-image:
    linear-gradient(#ffffff 1px, transparent 1px),
    linear-gradient(90deg, #ffffff 1px, transparent 1px);
  background-size: 26px 26px;
}
#smau-maps-pip .pip-map::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 10%, rgba(26, 115, 232, 0.18), transparent 55%),
    radial-gradient(circle at 80% 90%, rgba(255, 171, 64, 0.16), transparent 55%);
  pointer-events: none;
}
#smau-maps-pip .pip-road {
  position: absolute;
  background: #ffffff;
  box-shadow: 0 0 0 0.5px rgba(154, 160, 166, 0.4);
}
#smau-maps-pip .pip-road.main {
  left: -10%; right: -10%;
  top: 42%; height: 7px;
  background: #fbd04e;
}
#smau-maps-pip .pip-road.secondary {
  top: -10%; bottom: -10%;
  left: 58%; width: 6px;
}
#smau-maps-pip .pip-park {
  position: absolute;
  top: 8%; left: 6%;
  width: 40px; height: 30px;
  background: #c6eac5;
  border-radius: 5px;
  box-shadow: 0 0 0 0.5px rgba(102, 187, 106, 0.6);
}
#smau-maps-pip .pip-water {
  position: absolute;
  bottom: -6%; right: -8%;
  width: 62px; height: 46px;
  background: #aadaff;
  border-top-left-radius: 55%;
  box-shadow: 0 0 0 0.5px rgba(66, 133, 244, 0.6);
}
#smau-maps-pip .pip-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
#smau-maps-pip .pip-route-casing {
  fill: none;
  stroke: rgba(0, 0, 0, 0.5);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
#smau-maps-pip .pip-route-line {
  fill: none;
  stroke: #5aa2ff;
  stroke-width: 3.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
#smau-maps-pip .pip-dot {
  position: absolute;
  width: 13px;
  height: 13px;
  margin: -6.5px 0 0 -6.5px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #cfe4ff, #3b82f6 65%);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.28), 0 1px 6px rgba(0, 0, 0, 0.5);
  transition: left 0.25s linear, top 0.25s linear;
}
#smau-maps-pip[data-arrived="1"] .pip-dot {
  background: radial-gradient(circle at 35% 30%, #d6ffe0, #2ecc71 65%);
  box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.3), 0 1px 6px rgba(0, 0, 0, 0.5);
}

#smau-maps-pip .pip-info {
  padding: 7px 10px 9px;
  min-width: 0;
}
#smau-maps-pip .pip-dest {
  font-size: 12.5px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#smau-maps-pip .pip-eta {
  font-size: 11px;
  color: #9fc2ff;
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}
#smau-maps-pip[data-arrived="1"] .pip-eta { color: #86e5a4; }

#smau-maps-pip .pip-close {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
  color: #fff;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}
#smau-maps-pip .pip-close:hover { background: rgba(0, 0, 0, 0.7); }
