/* Clinics Map styles */

.floating-button {
    display: none;
}

#mapSection {
    flex: 1 1 auto;
    height: 610px;
}


.map-container{
    display: flex;
    margin: 4rem auto;
    border-radius: .3rem;
    border: 2px solid rgba(217, 217, 217, 1);
    overflow: hidden; 
}


/* container */
.search-container{ 
    flex: 0 1 400px;
    height: 610px; 
    display: flex;
    flex-direction: column;
    align-items: stretch;
    min-width: 0; 
}

.search-data{
    padding: 1rem;
    width: 100%;
    border-bottom: 2px solid rgba(217, 217, 217, 1);
}

#locationSearch{
    border: none;
    width: 18rem;
    background: #fff;
    padding: .7rem .5rem;
    border-radius: 6px;
    font-family: "Open Sans", serif;
    font-size: 16px;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
    font-variation-settings: "wdth" 100;
    color: #003865;
    margin-top: .5rem;
    border: 1px solid rgba(115, 115, 115, 1);
}

#locationSearch::placeholder{
    color: #003865;
    opacity: 1;
    text-transform: uppercase;
    font-weight: 400;
}

.find-a-clinic{
    background: rgba(0, 106, 198, 1);
}

.grid{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    /* max-width: 1000px; */
    margin: 0 auto;
}

.grid a{
    color: white;
    position: relative;
    font-size: 1rem;
    width: fit-content;
    white-space: nowrap;
}

.grid a:hover{
    font-weight: 500;
    color: white;
}

/* ==== Scrollable list ==== */
#clinicList{
  min-height: 0;           /* IMPORTANT for flex children to allow scrolling */
  scrollbar-gutter: stable;
  overflow-y: auto;  
  -webkit-overflow-scrolling: touch;
  flex: 1 1 auto; 
  min-width: 0; 
}

/* Optional: subtle custom scrollbar (WebKit/Blink) */
#clinicList::-webkit-scrollbar{ width: 10px; }
#clinicList::-webkit-scrollbar-track{ background: #F5F7FA; }
#clinicList::-webkit-scrollbar-thumb{ background: #D3D8DE; border-radius: 8px; }
#clinicList::-webkit-scrollbar-thumb:hover{ background: #C2C8CF; }

/* ==== Cards ==== */
.clinic-card{
  background: #fff;
  border-bottom: 2px solid #ECECEC;
  padding: 1rem;
  text-align: left;
  cursor: pointer;
  /* margin: 0 1rem; */
}

.clinic-card.is-active{
  background-color: #f2f2f2;
}

.clinic-card:last-child{ border-bottom: none; }

/* Header: title + distance/right controls */
.clinic-card__header{
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 12px;
}

.clinic-card__title{
  margin: 0;
  font-size: 16px;
  line-height: 1.25;
  font-weight: 700;
  color: #006AC6;                 /* brand blue */
}

.clinic-card__distance{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: rgba(0, 106, 198, 1);
  font-weight: 600;
}
.clinic-card__distance img{
  object-fit: contain;
  width: 1rem;
}

/* Body: address + phone */
.clinic-card__body{
  margin-top: 8px;
  color: #003865;
  font-size: 14px;
  line-height: 1.4;
}
.clinic-card__addr p{
  font-size: .9rem;
 }
.clinic-card__phone{
  font-size: .9rem;
  text-decoration: none;
  font-weight: 400;
  color: #003865;
}
.clinic-card__phone:hover{ text-decoration: underline; }

/* Footer: buttons side-by-side */
.clinic-card__footer{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.clinic-card__footer .btn{
    box-shadow: none;
}

.radius-options label{
    display:inline-flex;
    align-items:center;
    gap:4px;
    margin-right:14px;
    font-size:14px;
    cursor:pointer;
    color:#003865;
    font-family:"Open Sans", serif;
}
.radius-options input[type=radio]{
    accent-color:#006AC6;
    cursor:pointer;
} 

/* Label with clinic name next to the selected pin */
.gm-clinic-label{
    position: absolute;
    transform: translate(10px, -50%);
    background: #fff;
    color: #003865;
    border: 1px solid #D9D9D9;
    border-radius: 8px;
    padding: 6px 10px;
    font: 700 14px/1.2 "Open Sans", sans-serif;
    white-space: nowrap;
    box-shadow: 0 1px 2px rgba(0,0,0,.06);
    pointer-events: none;     
}
.gm-clinic-label::before{         
    content:"";
    position:absolute; left:-6px; top:50%;
    transform: translateY(-50%);
    border-top:6px solid transparent;
    border-bottom:6px solid transparent;
    border-right:6px solid #D9D9D9;
}
.gm-clinic-label::after{           
    content:"";
    position:absolute; left:-5px; top:50%;
    transform: translateY(-50%);
    border-top:5px solid transparent;
    border-bottom:5px solid transparent;
    border-right:5px solid #fff;
}


@media (max-width: 1200px){
    .search-section{
        padding-left: 2rem;
        padding-right: 2rem;
    } 
}
@media (max-width: 768px){
    .radius-options label{
        margin-right:10px;
        font-size:13px;
    }
    #mapSection {
        display: none;
    }
    .search-container{
        width: 100%;
        border: 2px solid rgba(217, 217, 217, 1);
        border-radius: .3rem;
    }
    .map-container{
        justify-content: center;
        border: none;
        padding: 1rem;
        margin: 2rem auto;
    }
}

@media (max-width: 500px){
    #searchMessage h4{
        font-size: 1rem;
    }

    .clinic-card__footer a{
        padding: .8rem 1rem;
    }
}

@media (max-width: 470px){
  #locationSearch{ width: 100%; }

  .search-container{
    flex: 1 1 auto;   
    width: 100%;
    /* height: auto;     */
    min-width: 0; 
  }

  .search-section{
    padding-left: 0;
    padding-right: 0;
  }
}

@media (max-width: 380px){
    .clinic-card__footer a{
        padding: .8rem .6rem;
    }
}
