/*
 * لوين؟ — the known stops on the maps (js/stops-layer.js) of «الخطوط», «الرحلة» and «ارسم خطًا».
 * Quiet on purpose: small, slate-blue, a little transparent, under every line and marker, never a target.
 * Not to be confused with the lines' own marks (yellow circle / teal square ringed in navy, the navy
 * numbered stops of /add, the navy callouts of /trip).
 */

:root {
  --stop-sign: #5A7495;
  --stop-name: #3E5573;
}

/* Over the tiles (200), under the lines (overlay pane, 400), the drawn route (450) and the markers (600). */
.leaflet-lowein-stops-pane {
  z-index: 350;
  pointer-events: none;
}
.leaflet-lowein-stops-pane * { pointer-events: none !important; }

.stop-mark__in {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
}

/* 14 px rounded square, a white halo so it reads on any tile. */
.stop-mark__sign {
  position: absolute;
  inset: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  background: var(--stop-sign);
  box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.95), 0 1px 2px rgba(20, 45, 78, 0.25);
  opacity: 0.88;
}
.stop-mark__glyph {
  display: block;
  width: 10px;
  height: 10px;
  fill: #FFFFFF;
}

/* The name, before the sign in reading order (to its left), from zoom 15 (.has-names, set by the script). */
.stop-mark__name {
  position: absolute;
  top: 50%;
  right: calc(100% + 4px);
  display: none;
  max-width: 11rem;
  overflow: hidden;
  color: var(--stop-name);
  font-family: var(--font, "Noto Sans Arabic", Tahoma, Arial, sans-serif);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow:
    0 0 2px #FFFFFF, 0 0 2px #FFFFFF, 0 0 3px #FFFFFF,
    1px 0 0 #FFFFFF, -1px 0 0 #FFFFFF, 0 1px 0 #FFFFFF, 0 -1px 0 #FFFFFF;
  transform: translateY(-50%);
}
.leaflet-lowein-stops-pane.has-names .stop-mark__name { display: block; }
.leaflet-lowein-stops-pane.has-names .stop-mark__name.is-crowded { display: none; }

/* «الخطوط»: out of the way while a correction is drawn. */
.map--public.is-drawing .leaflet-lowein-stops-pane { display: none; }

/* Forced colours: the map tiles keep their colours, so do the stops (and stay readable on them). */
@media (forced-colors: active) {
  .stop-mark__sign,
  .stop-mark__name { forced-color-adjust: none; }
}

@media print {
  .stop-mark__sign { box-shadow: 0 0 0 1px #FFFFFF; opacity: 1; }
}
