
/* SIMSAR_SELECTED_GLASS_V8 */
/* Only selected property on Map V1, mobile only */

@media screen and (max-width:767px) {

  /* The existing map layout remains the positioning context */
  #page-map.active #simsar-map-v1 .smv2-layout {
    position:relative !important;
  }

  /* Selected property: transparent floating card above map */
  #page-map.active #simsar-map-v1.smv2-sheet-open
  .smv2-panel:has(.smv2-card.smv2-selected) {
    display:flex !important;
    position:absolute !important;
    left:12px !important;
    right:12px !important;
    bottom:calc(12px + env(safe-area-inset-bottom,0px)) !important;
    top:auto !important;
    width:auto !important;
    height:auto !important;
    max-height:min(38dvh,250px) !important;
    min-height:0 !important;
    z-index:30 !important;
    margin:0 !important;
    padding:0 !important;
    border:1px solid rgba(255,255,255,.75) !important;
    border-radius:18px !important;
    background:rgba(255,255,255,.80) !important;
    -webkit-backdrop-filter:blur(15px);
    backdrop-filter:blur(15px);
    box-shadow:0 10px 32px rgba(13,32,54,.20) !important;
    overflow:hidden !important;
  }

  /* Compact title row with accessible close button */
  #page-map.active #simsar-map-v1.smv2-sheet-open
  .smv2-panel:has(.smv2-selected) .smv2-panel-head {
    flex:0 0 auto;
    min-height:35px !important;
    padding:3px 12px !important;
    background:transparent !important;
    border:0 !important;
  }

  #page-map.active #simsar-map-v1.smv2-sheet-open
  .smv2-panel:has(.smv2-selected) .smv2-panel-head strong {
    display:none !important;
  }

  #page-map.active #simsar-map-v1.smv2-sheet-open
  .smv2-panel:has(.smv2-selected) #smv2Close {
    display:grid !important;
    place-items:center;
    margin-inline-start:auto;
    width:34px !important;
    height:34px !important;
    min-width:34px !important;
    min-height:34px !important;
    border-radius:50%;
    background:rgba(238,242,247,.9);
    color:#263b50;
    font-size:24px;
    line-height:1;
  }

  /* Single selected result, no full results list */
  #page-map.active #simsar-map-v1.smv2-sheet-open
  .smv2-panel:has(.smv2-selected) .smv2-results {
    display:block !important;
    flex:0 1 auto !important;
    min-height:0 !important;
    max-height:calc(min(38dvh,250px) - 35px);
    padding:0 9px 10px !important;
    margin:0 !important;
    overflow-y:auto !important;
  }

  #page-map.active #simsar-map-v1.smv2-sheet-open
  .smv2-panel:has(.smv2-selected) .smv2-card {
    display:flex !important;
    flex-direction:row !important;
    align-items:center !important;
    gap:10px !important;
    padding:7px !important;
    margin:0 !important;
    width:100%;
    min-width:0;
    border:0 !important;
    border-radius:12px !important;
    background:rgba(255,255,255,.42) !important;
    box-shadow:none !important;
  }

  #page-map.active #simsar-map-v1
  .smv2-panel:has(.smv2-selected) .smv2-photo {
    flex:0 0 94px !important;
    width:94px !important;
    height:100px !important;
    border-radius:10px !important;
    overflow:hidden;
  }

  #page-map.active #simsar-map-v1
  .smv2-panel:has(.smv2-selected) .smv2-card-copy {
    flex:1 1 0;
    min-width:0;
    gap:5px !important;
  }

  #page-map.active #simsar-map-v1
  .smv2-panel:has(.smv2-selected) .smv2-card-copy strong {
    color:#20364d !important;
    font-size:14px !important;
  }

  #page-map.active #simsar-map-v1
  .smv2-panel:has(.smv2-selected) .smv2-card-copy b {
    color:#1259b2 !important;
    font-size:17px !important;
    font-weight:800 !important;
  }

  /* Hide full-results trigger while selected card is open */
  #page-map.active #simsar-map-v1.smv2-sheet-open
  .smv2-layout:has(.smv2-card.smv2-selected) #smv2Show {
    display:none !important;
  }
}

@media screen and (max-width:359px) {
  #page-map.active #simsar-map-v1
  .smv2-panel:has(.smv2-selected) .smv2-photo {
    flex-basis:76px !important;
    width:76px !important;
    height:86px !important;
  }
}

@media (prefers-reduced-motion:reduce) {
  #page-map.active #simsar-map-v1 .smv2-panel {
    transition:none !important;
  }
}
