  /* === routemap.css === */
  /* ===Style sheet for route maps === */

  /* === Layout === */
  body { margin:0; padding:0; }
  #map { position:absolute; top:0; bottom:0; width:100%; }

  /* === Toast message — pops up if user's location is outwith route extent (top-center) === */
  .ol-control.map-toast {
    position:absolute !important;
    top: calc(6px + env(safe-area-inset-top));
    left:50%; transform:translateX(-50%);
    z-index:1100;
    background:rgba(20,24,28,0.85); color:#fff;
    padding:6px 10px; border-radius:8px;
    font:13px/1.2 Arial, sans-serif;
    pointer-events:none; opacity:0; transition:opacity 180ms ease;
    white-space:nowrap; max-width:90vw; text-align:center;
    box-shadow:0 6px 16px rgba(0,0,0,0.18);
  }
  .ol-control.map-toast.show { opacity:1; }

  /* === Zoom control restyle === */
  .ol-control.ol-zoom {
    position:absolute; top:8px; left:8px;
    background:transparent; border:none; box-shadow:none; z-index:1100;
  }
  .ol-control.ol-zoom button {
    width:28px; height:28px; line-height:28px;
    padding:0; margin:0 0 6px 0; border:0; border-radius:2px;
    background:rgba(90,120,150,0.8); color:#fff;
    font:18px/28px Arial, sans-serif; cursor:pointer;
    transition:opacity .15s ease, background .15s ease;
  }
  .ol-control.ol-zoom button:hover { background:rgba(70,100,130,0.9); }
  /* Replace OL’s built-in zoom icons with plain text via CSS ::after (uses the button's title) */
  .ol-control.ol-zoom .ol-zoom-in::after,
  .ol-control.ol-zoom .ol-zoom-out::after {
    content: attr(title);
    display:block; text-align:center; font-weight:600;
  }
  .ol-control.ol-zoom .ol-zoom-in > span,
  .ol-control.ol-zoom .ol-zoom-out > span { display:none !important; }

  /* === Layers menu (under zoom) === */
  .ol-control.layer-menu {
    position: absolute !important;
    top: 96px; left: 7px; z-index: 1100;
  }
  .ol-control.layer-menu .layer-btn {
    width: 28px; height: 28px;
    display: grid; place-items: center;
    background: rgba(90,120,150,0.8);
    color:#fff; border:0; border-radius:2px; cursor:pointer; padding:0;
    outline:none; box-shadow:none;
  }
  .ol-control.layer-menu .layer-btn:hover { background: rgba(70,100,130,0.9); }
  .ol-control.layer-menu .menu {
    position:absolute; top:2px; left:44px;
    background:#fff;
    border-radius:3px; box-shadow:none; outline:none;
    padding:4px; min-width:140px; display:none;
  }
  .ol-control.layer-menu .menu button {
    display:block; width:100%;
    background:transparent; border:0; text-align:left;
    padding:2px 10px; font:14px Arial, sans-serif; color:#222;
    border-radius:2px; cursor:pointer;
  }
  .ol-control.layer-menu .menu button:hover { background:#f2f5f8; }
  .ol-control.layer-menu .menu button.active { background:#e8f0fb; color:#1f5fb8; }
  
 

  /* === Locate button (lines up under layer menu) === */
  .ol-control.locate-btn.bl {
    position: absolute;
    top: 150px;
    left: 7px;
  }
  .ol-control.locate-btn .locate-button {
    width: 28px; height: 28px;
    display: grid; place-items: center;
    background: rgba(90,120,150,0.8);
    color: #fff; border: 0; border-radius: 3px;
    cursor: pointer; padding: 0; box-shadow:none; outline:none;
  }
  .ol-control.locate-btn .locate-button:hover { background: rgba(70,100,130,0.9); }
  .ol-control.locate-btn .locate-button svg { width: 18px; height: 18px; display: block; }
  
  /* === Bottom-centre scale bar === */
  .ol-scale-line {
    position: absolute !important;
    top: calc(8px + env(safe-area-inset-top));
	left: 50%;
    transform: translateX(-50%);         
    bottom: auto;  right: auto;
    z-index: 1000;
    background: rgba(90,120,150,0.8);
    padding: 1px 3px;
    border-radius: 2px;
    box-shadow: 0 1px 2px rgba(0,0,0,.15);
	opacity:0.5;
  }

  /* Optional: tidy the inner ticks/label */
  .ol-scale-line-inner {
    border-style: solid;
    border-color: #ffffff;
    border-width: 0 1px 1px 1px;
    color: #ffffff;
    font: 9px/0.9 Arial, sans-serif;
	max-width: 110px;        /* ? pick your cap */
    white-space: nowrap;     /* keep label on one line */
    overflow: hidden;        /* hide any excess just in case */
    text-overflow: clip;
  }

  /* === Small screens === */
  @media (max-width: 380px) {
    .ol-control.layer-menu {   }
    .ol-control.ol-zoom {  }
  }
  
  /* OS branding: gently shrink and pin tighter to the corner */
  .os-api-branding {
    transform: scale(0.85); transform-origin: left bottom; 
  }

  /* Make the terms text a touch smaller too */
  .os-api-branding, .os-api-branding * {
    position: absolute !important;
    right: 0px !important; bottom:3px;
    font-size: 11px !important;         
    line-height: 1.15 !important;
  }

