/* RXOPD INDEX MOBILE REFERENCE V4
   Final high-specificity layer for the approved mobile reference.
   This file intentionally outranks older !important responsive rules. */

@media (max-width:850px){
  /* Keep official header/logo untouched. */

  /* Hero: target proportions, pin doesn't steal heading width. */
  html body.rx-ui-home main.rxhome section.rxhome-hero{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:8px!important;
    padding:14px!important;
    border-radius:18px!important;
    overflow:hidden!important;
  }
  html body.rx-ui-home main.rxhome section.rxhome-hero .rxhome-hero-copy{
    position:relative!important;
    min-width:0!important;
  }
  html body.rx-ui-home main.rxhome section.rxhome-hero .rxhome-hero-title-row{
    position:relative!important;
    display:block!important;
    margin:0 0 10px!important;
    padding:0!important;
    min-height:64px!important;
  }
  html body.rx-ui-home main.rxhome section.rxhome-hero .rxhome-hero-title-copy{
    padding-right:58px!important;
  }
  html body.rx-ui-home main.rxhome section.rxhome-hero .rxhome-hero-title-copy h1{
    margin:0 0 4px!important;
    font-size:25px!important;
    line-height:1.04!important;
    letter-spacing:-.035em!important;
    white-space:nowrap!important;
    color:#0d315c!important;
  }
  html body.rx-ui-home main.rxhome section.rxhome-hero .rxhome-hero-title-copy>p{
    margin:0!important;
    font-size:11.5px!important;
    line-height:1.28!important;
    color:#65798d!important;
  }
  html body.rx-ui-home main.rxhome section.rxhome-hero .rxhome-hero-medical-pin{
    position:absolute!important;
    top:0!important;
    right:3px!important;
    display:grid!important;
    place-items:center!important;
    width:48px!important;
    height:58px!important;
    margin:0!important;
    filter:drop-shadow(0 6px 10px rgba(30,99,169,.12))!important;
  }
  html body.rx-ui-home main.rxhome section.rxhome-hero .rxhome-hero-medical-pin svg{
    width:46px!important;
    height:55px!important;
  }
  html body.rx-ui-home main.rxhome section.rxhome-hero .rxhome-hero-art{display:none!important}

  /* Search panel exactly like the approved preview: white container, 2 rows. */
  html body.rx-ui-home main.rxhome section.rxhome-hero #rxhome-care-search.rxhome-location-search-compact{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) 94px!important;
    grid-template-rows:42px 42px!important;
    gap:7px!important;
    width:100%!important;
    max-width:none!important;
    height:auto!important;
    min-height:103px!important;
    margin:0!important;
    padding:9px!important;
    border:1px solid #e1eaf1!important;
    border-radius:15px!important;
    background:#fff!important;
    box-shadow:0 7px 18px rgba(19,57,87,.055)!important;
    overflow:visible!important;
  }
  html body.rx-ui-home main.rxhome #rxhome-care-search .rxhome-location-entry{
    grid-column:1/-1!important;
    grid-row:1!important;
    display:grid!important;
    grid-template-columns:42px minmax(0,1fr)!important;
    width:100%!important;
    height:42px!important;
    min-height:42px!important;
    margin:0!important;
    padding:0!important;
    border:1px solid #d5e2eb!important;
    border-radius:11px!important;
    background:#fff!important;
    box-shadow:none!important;
    overflow:hidden!important;
  }
  html body.rx-ui-home main.rxhome #rxhome-care-search .rxhome-location-detect{
    display:grid!important;
    place-items:center!important;
    width:42px!important;
    min-width:42px!important;
    height:40px!important;
    min-height:40px!important;
    margin:0!important;
    padding:0!important;
    border:0!important;
    border-right:1px solid #e0e8ee!important;
    border-radius:0!important;
    background:#f9fcff!important;
    color:#1680d9!important;
    box-shadow:none!important;
  }
  html body.rx-ui-home main.rxhome #rxhome-care-search .rxhome-location-svg{
    width:20px!important;
    height:20px!important;
  }
  html body.rx-ui-home main.rxhome #rxhome-care-search .rxhome-field-location{
    display:block!important;
    width:100%!important;
    height:40px!important;
    min-height:40px!important;
    margin:0!important;
    padding:0!important;
    border:0!important;
    border-radius:0!important;
    background:#fff!important;
    box-shadow:none!important;
  }
  html body.rx-ui-home main.rxhome #rxhome-care-search .rxhome-field-location input{
    width:100%!important;
    height:40px!important;
    min-height:40px!important;
    margin:0!important;
    padding:0 11px!important;
    border:0!important;
    outline:0!important;
    border-radius:0!important;
    background:#fff!important;
    box-shadow:none!important;
    font-size:11px!important;
    color:#29455f!important;
  }
  html body.rx-ui-home main.rxhome #rxhome-care-search .rxhome-field-select{
    grid-column:1!important;
    grid-row:2!important;
    display:grid!important;
    grid-template-columns:42px minmax(0,1fr)!important;
    align-items:center!important;
    width:100%!important;
    height:42px!important;
    min-height:42px!important;
    margin:0!important;
    padding:0!important;
    border:1px solid #d5e2eb!important;
    border-radius:11px!important;
    background:#fff!important;
    box-shadow:none!important;
    overflow:hidden!important;
  }
  html body.rx-ui-home main.rxhome #rxhome-care-search .rxhome-speciality-icon{
    display:grid!important;
    place-items:center!important;
    width:42px!important;
    height:40px!important;
    min-width:42px!important;
    margin:0!important;
    border-right:1px solid #e0e8ee!important;
    color:#102f58!important;
  }
  html body.rx-ui-home main.rxhome #rxhome-care-search .rxhome-speciality-icon svg{
    width:20px!important;
    height:20px!important;
  }
  html body.rx-ui-home main.rxhome #rxhome-care-search .rxhome-field-select select{
    -webkit-appearance:none!important;
    appearance:none!important;
    width:100%!important;
    height:40px!important;
    min-height:40px!important;
    margin:0!important;
    padding:0 30px 0 10px!important;
    border:0!important;
    outline:0!important;
    border-radius:0!important;
    background-color:#fff!important;
    background-image:linear-gradient(45deg,transparent 50%,#6c8295 50%),linear-gradient(135deg,#6c8295 50%,transparent 50%)!important;
    background-position:calc(100% - 15px) 17px,calc(100% - 10px) 17px!important;
    background-size:5px 5px,5px 5px!important;
    background-repeat:no-repeat!important;
    box-shadow:none!important;
    color:#173957!important;
    font-size:11px!important;
    font-weight:700!important;
  }
  html body.rx-ui-home main.rxhome #rxhome-care-search .rxhome-btn.rxhome-btn-green{
    grid-column:2!important;
    grid-row:2!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    gap:5px!important;
    width:94px!important;
    min-width:94px!important;
    max-width:94px!important;
    height:42px!important;
    min-height:42px!important;
    margin:0!important;
    padding:0 9px!important;
    border:0!important;
    border-radius:11px!important;
    background:linear-gradient(135deg,#08a879,#078c68)!important;
    color:#fff!important;
    box-shadow:none!important;
    font-size:10.5px!important;
    font-weight:800!important;
  }
  html body.rx-ui-home main.rxhome #rxhome-care-search .rxhome-search-btn-svg{
    width:15px!important;
    height:15px!important;
  }

  /* Explore is directly after hero on mobile. */
  html body.rx-ui-home main.rxhome section.rxhome-near-section{
    order:2!important;
    margin:12px 0 0!important;
    padding:11px!important;
    border:1px solid #e0e9f0!important;
    border-radius:16px!important;
    background:#fff!important;
    box-shadow:0 7px 18px rgba(19,57,87,.045)!important;
    overflow:hidden!important;
  }
  html body.rx-ui-home main.rxhome section.rxhome-actions-section{order:3!important}

  html body.rx-ui-home main.rxhome section.rxhome-near-section .rxhome-near-head{
    display:flex!important;
    align-items:center!important;
    justify-content:space-between!important;
    gap:8px!important;
    margin:0 0 8px!important;
  }
  html body.rx-ui-home main.rxhome section.rxhome-near-section .rxhome-near-head h2{
    margin:0!important;
    font-size:17px!important;
    line-height:1.1!important;
    color:#0f3158!important;
  }
  html body.rx-ui-home main.rxhome section.rxhome-near-section .rxhome-map-head-link{
    display:inline-flex!important;
    align-items:center!important;
    gap:3px!important;
    font-size:9.5px!important;
    line-height:1!important;
    color:#1772cf!important;
    text-decoration:none!important;
    white-space:nowrap!important;
  }

  /* Force-remove the old pill row, which had stronger selectors. */
  html body.rx-ui-home main.rxhome section.rxhome-near-section .rxhome-pills,
  html body.rx-ui-home.rx-standard-shell main.rxhome section.rxhome-near-section .rxhome-pills,
  html body.rx-ui-home.rx-role-shell main.rxhome section.rxhome-near-section .rxhome-pills{
    display:none!important;
    visibility:hidden!important;
    width:0!important;
    height:0!important;
    min-height:0!important;
    max-height:0!important;
    margin:0!important;
    padding:0!important;
    border:0!important;
    overflow:hidden!important;
  }

  html body.rx-ui-home main.rxhome section.rxhome-near-section .rxhome-near-grid{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:7px!important;
    width:100%!important;
    overflow:visible!important;
  }
  html body.rx-ui-home main.rxhome section.rxhome-near-section .rxhome-map-card{
    position:relative!important;
    grid-column:1/-1!important;
    display:block!important;
    width:100%!important;
    height:120px!important;
    min-height:120px!important;
    max-height:120px!important;
    margin:0!important;
    padding:0!important;
    border:1px solid #e1e9ef!important;
    border-radius:13px!important;
    background:#eef7f7!important;
    overflow:hidden!important;
    box-shadow:none!important;
  }
  html body.rx-ui-home main.rxhome section.rxhome-near-section .rxhome-map-card>img{
    display:block!important;
    width:100%!important;
    height:120px!important;
    min-height:120px!important;
    max-height:120px!important;
    margin:0!important;
    padding:0!important;
    border:0!important;
    object-fit:cover!important;
    background:transparent!important;
  }
  /* Kill the legacy blue panel and turn it into the reference white chip. */
  html body.rx-ui-home main.rxhome section.rxhome-near-section .rxhome-map-card>span.rxhome-map-chip,
  html body.rx-ui-home.rx-standard-shell main.rxhome section.rxhome-near-section .rxhome-map-card>span.rxhome-map-chip,
  html body.rx-ui-home.rx-role-shell main.rxhome section.rxhome-near-section .rxhome-map-card>span.rxhome-map-chip{
    position:absolute!important;
    top:7px!important;
    right:7px!important;
    bottom:auto!important;
    left:auto!important;
    z-index:4!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    gap:4px!important;
    width:auto!important;
    min-width:0!important;
    max-width:max-content!important;
    height:29px!important;
    min-height:29px!important;
    max-height:29px!important;
    margin:0!important;
    padding:0 9px!important;
    border:1px solid #d9e7f0!important;
    border-radius:999px!important;
    background:rgba(255,255,255,.96)!important;
    color:#1672d1!important;
    box-shadow:0 5px 12px rgba(23,72,108,.09)!important;
    font-size:9px!important;
    line-height:1!important;
    white-space:nowrap!important;
  }
  html body.rx-ui-home main.rxhome section.rxhome-near-section .rxhome-map-card>.rxhome-map-chip svg{
    width:12px!important;
    height:12px!important;
    flex:0 0 12px!important;
  }

  /* Exact compact 2×2 service cards. */
  html body.rx-ui-home main.rxhome section.rxhome-near-section .rxhome-near-card{
    position:relative!important;
    display:grid!important;
    grid-template-columns:36px minmax(0,1fr) 10px!important;
    grid-template-rows:auto auto!important;
    align-content:center!important;
    align-items:center!important;
    column-gap:7px!important;
    row-gap:1px!important;
    width:100%!important;
    height:74px!important;
    min-height:74px!important;
    max-height:74px!important;
    margin:0!important;
    padding:8px!important;
    border:1px solid #dfe8ef!important;
    border-radius:12px!important;
    background:#fff!important;
    box-shadow:none!important;
    overflow:hidden!important;
    text-decoration:none!important;
  }
  html body.rx-ui-home main.rxhome section.rxhome-near-section .rxhome-near-card::after{
    content:'›'!important;
    grid-column:3!important;
    grid-row:1/3!important;
    align-self:center!important;
    justify-self:end!important;
    color:#173b58!important;
    font-size:17px!important;
    line-height:1!important;
  }
  html body.rx-ui-home main.rxhome section.rxhome-near-section .rxhome-near-icon{
    grid-column:1!important;
    grid-row:1/3!important;
    display:grid!important;
    place-items:center!important;
    width:36px!important;
    height:36px!important;
    min-width:36px!important;
    min-height:36px!important;
    margin:0!important;
    padding:0!important;
    border-radius:10px!important;
  }
  html body.rx-ui-home main.rxhome section.rxhome-near-section .rxhome-near-svg{
    width:19px!important;
    height:19px!important;
  }
  html body.rx-ui-home main.rxhome section.rxhome-near-section .rxhome-near-card>strong{
    grid-column:2!important;
    grid-row:1!important;
    align-self:end!important;
    margin:0!important;
    font-size:10.3px!important;
    line-height:1.12!important;
    color:#173957!important;
    font-weight:800!important;
  }
  html body.rx-ui-home main.rxhome section.rxhome-near-section .rxhome-near-card>small{
    grid-column:2!important;
    grid-row:2!important;
    align-self:start!important;
    margin:0!important;
    font-size:7.7px!important;
    line-height:1.15!important;
    color:#74879a!important;
    white-space:normal!important;
  }
  html body.rx-ui-home main.rxhome section.rxhome-near-section .rxhome-near-footer{
    margin:7px 0 0!important;
    padding:0!important;
  }
  html body.rx-ui-home main.rxhome section.rxhome-near-section .rxhome-viewall-link{
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    width:100%!important;
    height:34px!important;
    min-height:34px!important;
    max-height:34px!important;
    margin:0!important;
    padding:0 10px!important;
    border:0!important;
    border-radius:999px!important;
    background:#e8f8f2!important;
    color:#078a66!important;
    font-size:9.5px!important;
    line-height:1!important;
    font-weight:850!important;
    text-decoration:none!important;
  }

  /* What-do-you-need stays functional, but moves below Explore and stops dominating the screen. */
  html body.rx-ui-home main.rxhome section.rxhome-actions-section{
    margin-top:12px!important;
  }
  html body.rx-ui-home main.rxhome section.rxhome-actions-section>h2{
    margin:0 0 8px!important;
    font-size:17px!important;
    line-height:1.1!important;
    text-align:left!important;
  }
  html body.rx-ui-home main.rxhome section.rxhome-actions-section .rxhome-actions{
    display:grid!important;
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
    gap:7px!important;
  }
  html body.rx-ui-home main.rxhome section.rxhome-actions-section .rxhome-actions>a{
    min-height:68px!important;
    height:68px!important;
    max-height:68px!important;
    padding:6px 3px!important;
    border-radius:12px!important;
    gap:4px!important;
  }
  html body.rx-ui-home main.rxhome section.rxhome-actions-section .rxhome-action-icon{
    width:30px!important;
    height:30px!important;
    border-radius:9px!important;
  }
  html body.rx-ui-home main.rxhome section.rxhome-actions-section .rxhome-action-svg{
    width:17px!important;
    height:17px!important;
  }
  html body.rx-ui-home main.rxhome section.rxhome-actions-section .rxhome-actions>a b{
    font-size:8.7px!important;
    line-height:1.05!important;
    text-align:center!important;
  }
  html body.rx-ui-home main.rxhome section.rxhome-actions-section .rxhome-action-status{
    font-size:6.8px!important;
    padding:2px 4px!important;
    margin-top:-2px!important;
  }
}

@media (max-width:390px){
  html body.rx-ui-home main.rxhome section.rxhome-hero .rxhome-hero-title-copy h1{font-size:23px!important}
  html body.rx-ui-home main.rxhome section.rxhome-hero .rxhome-hero-title-copy>p{font-size:10.5px!important}
  html body.rx-ui-home main.rxhome section.rxhome-near-section .rxhome-near-card{
    grid-template-columns:34px minmax(0,1fr) 9px!important;
    height:70px!important;
    min-height:70px!important;
    max-height:70px!important;
    padding:7px!important;
    column-gap:6px!important;
  }
  html body.rx-ui-home main.rxhome section.rxhome-near-section .rxhome-near-icon{
    width:34px!important;height:34px!important;min-width:34px!important;min-height:34px!important
  }
  html body.rx-ui-home main.rxhome section.rxhome-near-section .rxhome-near-card>strong{font-size:9.7px!important}
  html body.rx-ui-home main.rxhome section.rxhome-near-section .rxhome-near-card>small{font-size:7.2px!important}
}

@media (max-width:350px){
  html body.rx-ui-home main.rxhome section.rxhome-hero .rxhome-hero-title-copy h1{font-size:21px!important}
  html body.rx-ui-home main.rxhome section.rxhome-hero #rxhome-care-search.rxhome-location-search-compact{grid-template-columns:minmax(0,1fr) 82px!important}
  html body.rx-ui-home main.rxhome #rxhome-care-search .rxhome-btn.rxhome-btn-green{width:82px!important;min-width:82px!important;max-width:82px!important}
  html body.rx-ui-home main.rxhome section.rxhome-actions-section .rxhome-actions{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  html body.rx-ui-home main.rxhome section.rxhome-actions-section .rxhome-actions>a{height:64px!important;min-height:64px!important;max-height:64px!important}
}

@media (max-width:850px){
  html body.rx-ui-home main.rxhome{
    width:100%!important;
    max-width:100%!important;
    margin-left:0!important;
    margin-right:0!important;
    padding-left:10px!important;
    padding-right:10px!important;
    box-sizing:border-box!important;
    overflow-x:hidden!important;
  }
}
