/* Manor Road map — the map page only. Sits on top of styles.css; goes with map.js and images/manor-road-map.svg */

  /* ============ LAYOUT ============ */
  /* the header and the map share one screen, the footer follows underneath */
  .map-screen{
    display:flex;
    flex-direction:column;
    height:100vh;
    height:100dvh;
  }
  .finder{
    flex:1;
    display:flex;
    min-height:0;
  }
  .finder-sidebar{
    flex:0 0 320px;
    display:flex;
    flex-direction:column;
    min-height:0;
    background:var(--cream);
    border-right:1px solid var(--line);
  }
  .map-display{
    position:relative;
    flex:1;
    min-width:0;
    min-height:0;
    cursor:grab;
    touch-action:none;
    user-select:none;
    -webkit-user-select:none;
  }
  .map-display.dragging{ cursor:grabbing; }
  .map-display svg{
    position:absolute;
    top:0; left:0;
    width:100%;
    height:100%;
    max-width:none;
    opacity:0;
    transition:opacity .5s ease;
  }
  .map-display.loaded svg{ opacity:1; }

  /* ============ SEARCH ============ */
  .finder-search{ position:relative; padding:20px 20px 16px; }
  .finder-search input{
    width:100%;
    font-family:var(--body);
    font-size:16px;
    font-weight:500;
    line-height:1.3;
    padding:11px 38px;
    border:1px solid var(--flint);
    border-radius:2px;
    background:var(--paper);
    color:var(--ink);
    -webkit-appearance:none;
    appearance:none;
  }
  .finder-search input::placeholder{ color:var(--flint); }
  .finder-search input:focus,
  .finder-search input:focus-visible{ outline:none; }
  .finder-search input::-webkit-search-decoration,
  .finder-search input::-webkit-search-cancel-button{ -webkit-appearance:none; }
  .search-icon{
    position:absolute;
    left:32px;
    top:22px;
    width:16px;
    height:16px;
    margin-top:14px;
    color:var(--ink-soft);
    pointer-events:none;
  }
  .search-clear{
    position:absolute;
    right:26px;
    top:22px;
    width:30px;
    height:30px;
    margin-top:7px;
    border:0;
    border-radius:2px;
    background:none;
    color:var(--ink-soft);
    font-size:22px;
    line-height:1;
    cursor:pointer;
  }
  .search-clear:hover{ background:var(--paper-alt); color:var(--ink); }

  /* ============ HOUSE LIST ============ */
  .finder-list{
    flex:1;
    min-height:0;
    overflow-y:auto;
    border-top:1px solid var(--line);
    scrollbar-width:thin;
    scrollbar-color:rgba(41,33,15,0.22) transparent;
  }
  .finder-list::-webkit-scrollbar{ width:8px; }
  .finder-list::-webkit-scrollbar-track{ background:transparent; }
  .finder-list::-webkit-scrollbar-thumb{
    background:rgba(41,33,15,0.22);
    border-radius:8px;
    border:2px solid var(--cream);
  }
  .finder-list::-webkit-scrollbar-thumb:hover{ background:rgba(41,33,15,0.4); }
  .finder-list button{
    display:block;
    width:100%;
    text-align:left;
    background:none;
    border:0;
    border-bottom:1px solid var(--line);
    padding:8px 20px;
    font-family:var(--body);
    font-size:14.5px;
    line-height:1.35;
    color:var(--ink);
    cursor:pointer;
  }
  .finder-list button:last-child{ border-bottom:0; }
  .finder-list button:hover,
  .finder-list button:focus{ background:var(--paper-alt); outline:none; }
  .finder-list button.active{ background:var(--hedge); color:var(--cream); }
  .finder-list b{ font-weight:700; }
  .finder-list .no-results{
    padding:14px 20px;
    font-size:13.5px;
    line-height:1.5;
    color:var(--brick);
  }

  /* ============ THE MAP ============ */
  .map-ground{ fill:var(--paper); }
  .house{ cursor:pointer; transition:opacity .3s ease; }
  .house path{
    stroke:var(--cream);
    stroke-width:0;
    paint-order:stroke;
    transition:fill .18s ease, stroke-width .18s ease;
  }
  .house text{ pointer-events:all; }
  .house text,
  .road-names text,
  .area-names text{
    paint-order:stroke;
    stroke:var(--paper);
    stroke-width:0;
    stroke-linejoin:round;
    transition:fill .18s ease;
  }
  .road-names,
  .area-names,
  .hatch{ transition:opacity .3s ease; }
  .house:hover path{ fill:#6f5750; }

  /* while something is lit, everything else fades back */
  svg.searching .house,
  svg.searching .hatch{ opacity:0.2; }
  svg.searching .road-names,
  svg.searching .area-names{ opacity:0.35; }
  svg.searching .match{ opacity:1; }
  .house.match path{ fill:var(--hedge); stroke-width:0.9; }
  .house.match text{ fill:var(--hedge-dark); font-weight:700; stroke-width:1.6; }
  .house.active path{ fill:var(--hedge-dark); }

  /* ============ ZOOM ============ */
  .map-zoom-controls{
    position:absolute;
    right:20px;
    bottom:20px;
    display:flex;
    flex-direction:column;
    gap:6px;
  }
  .map-zoom-btn{
    width:38px;
    height:38px;
    border:1px solid var(--flint);
    background:var(--cream);
    color:var(--ink);
    font-size:21px;
    font-family:var(--body);
    font-weight:600;
    cursor:pointer;
    border-radius:4px;
    display:flex;
    align-items:center;
    justify-content:center;
    box-shadow:0 2px 6px rgba(0,0,0,0.12);
    transition:background .15s ease;
  }
  .map-zoom-btn:hover{ background:var(--paper-alt); }

  /* ============ SMALL SCREENS ============ */
  @media (max-width:760px){
    .finder{ flex-direction:column; }
    .finder-sidebar{
      flex:0 0 auto;
      border-right:0;
      border-bottom:1px solid var(--line);
    }
    .finder-search{ padding:14px 16px 12px; }
    .search-icon{ left:28px; top:16px; }
    .search-clear{ right:22px; top:16px; }
    .finder-list{ max-height:30vh; }
    .finder-list button{ padding:8px 16px; font-size:14px; }
    .map-zoom-controls{ right:12px; bottom:12px; }
    .map-zoom-btn{ width:34px; height:34px; font-size:19px; }
  }
