.dhcs-ocihsl .map-results,
.dhcs-pms .map-results {
    display: block;
    scroll-behavior: smooth;
}

@media screen and (min-width: 768px) {
    .dhcs-ocihsl .map-results,
    .dhcs-pms .map-results {
        display: flex;
        flex-direction: row;
        justify-content: flex-start;
        align-items: stretch;
        gap: 8px;
    }

    .dhcs-pms .map-results:not(.has-results) #viewDiv {
        flex: 0 0 100%;
        width: 100%;
    }

    .dhcs-pms .map-results.has-results #viewDiv {
        flex: 1 1 auto;
        width: auto;
        min-width: 0;
    }

    .dhcs-pms .map-results.has-results .result-list {
        display: block;
        align-self: stretch;
        height: 552px;
    }

    .dhcs-pms .map-results.pms-map-loading #viewDiv {
        flex: 0 0 100%;
        width: 100%;
    }

    .dhcs-pms .map-results.pms-map-loading .result-list {
        display: none !important;
    }
}

.dhcs-ocihsl .result-list {
    margin-right: 10px;        /* Adds space between the two divs */
    background-color: #f5f5f5; /* Optional: Add background color to the results section */
    overflow-y: auto;          /* Allows scrolling if the content is long */
}

.dhcs-pms .result-list {
    margin-right: 0;
    background-color: white;
    overflow-y: auto;
    display: none;
}

.dhcs-ocihsl .mapview {
    height: 500px;             /* Ensure a fixed height for the map view */
    background-color: #eaeaea; /* Optional: Add background color to the map section */
}

.dhcs-pms .mapview {
    height: 500px;
    background-color: #eaeaea;
}


.dhcs-ocihsl #viewDiv {
    /* width: 100%; */
    min-width: 300px;
    min-height: 552px;
    border: 1px solid #00000014;

    /* @media screen and (min-width: 768px) {
        min-height: 550px;
    } */
}

.dhcs-pms #viewDiv {
    min-width: 0;
    flex: 0 0 60%;
    width: 60%;
    min-height: 552px;
    border: 1px solid #00000014;
    position: relative;
    overflow: hidden;
}

@media screen and (max-width: 767px) {
    .dhcs-pms #viewDiv {
        flex: 0 0 100%;
        width: 100%;
    }
}

.dhcs-pms .map-results.pms-map-loading {
    position: relative;
    cursor: progress;
    isolation: isolate;
}

.dhcs-pms .map-results.pms-map-loading::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.72);
    z-index: 20;
}

.dhcs-pms .map-results.pms-map-loading::after {
    content: 'Searching...';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 0.75rem 1rem;
    background: #17315a;
    color: #fff;
    border-radius: 0.35rem;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    z-index: 21;
    white-space: nowrap;
}

.dhcs-ocihsl input#nearsearchInput {
    display: block;
    margin-top: 30px;
}

.dhcs-ocihsl .form-control {
    display: block;
    width: 100%;
    padding: .375rem .75rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #dee2e6;
    appearance: none;
    border-radius: 0.25rem;
    transition: border-color .15s ease-in-out,box-shadow .15s ease-in-out
}


@media screen and (min-width: 768px) {
    .dhcs-ocihsl .form-maxwidth{
        max-width: 300px;
    }
    .btn{
        width: initial !important;
    }
}

.dhcs-ocihsl .btn-primary {
    background-color: #2d6e8d !important;
    color: white !important;
    -webkit-transition: all 0.5s;
    transition: all 0.5s;
}
.dhcs-ocihsl .pagination{
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
}
.dhcs-ocihsl .pagination button:hover,
.dhcs-ocihsl .btn-primary:hover {
    background-color: #335969 !important;
    color: white !important;
}
.dhcs-ocihsl .pagination button,
.dhcs-ocihsl .btn {
    /* width: 100%; */
    display: inline-block;
    margin-bottom: 0;
    font-weight: normal;
    text-align: center;
    vertical-align: middle;
    -ms-touch-action: manipulation;
    touch-action: manipulation;
    cursor: pointer;
    background-image: none;
    border: 1px solid transparent;
    white-space: nowrap;
    padding: 6px 12px;
    font-size: 16px;
    line-height: 1.42857143;
    border-radius: 0.25rem;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    text-decoration: none !important;
    border-radius: 7px;
    font-weight: 600;
    transition: color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;
}

.dhcs-ocihsl .form-select {
    background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1' width='24' height='24' viewBox='0 0 24 24'><path d='M17.087 10.35l-4.337 4.336-4.337-4.336c-0.293-0.293-0.768-0.293-1.060 0s-0.293 0.768 0 1.060l4.864 4.864c0.147 0.147 0.341 0.221 0.533 0.219 0.194 0 0.386-0.072 0.533-0.219l4.865-4.864c0.293-0.293 0.293-0.768 0-1.060s-0.768-0.293-1.061 0z'/></svg>");
    display: block;
    width: 100%;
    padding: .375rem 2.25rem .375rem .75rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #212529;
    background-color: #fff;
    background-repeat: no-repeat;
    background-position: right .75rem center;
    background-size: 20px 20px;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    transition: border-color .15s ease-in-out,box-shadow .15s ease-in-out;
    appearance: none
}


.dhcs-ocihsl .container {
    display: flex; /* or inline-flex */
    flex-direction: row;
    flex-wrap: wrap;
    gap:15px;
    width: 100%;
    overflow: hidden;
  }
  @media screen and (min-width: 1299px) {
    .dhcs-ocihsl .container{
        display: inline-flex; /* or inline-flex */
    }
}

.dhcs-ocihsl .mapview
{
    flex: 60%;
}
.dhcs-ocihsl .result-list{
    display: none;
}

.dhcs-pms .result-list
{
    flex: 0 0 35%;
    width: 35%;
    max-height: 552px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    margin-bottom: 20px;
    margin-right: 0;
}

@media screen and (max-width: 767px) {
    .dhcs-pms .result-list {
        flex: 0 0 100%;
        width: 100%;
        margin-right: 0;
    }
}

/* Empty-state: remove max-height cap so the result column fills to map height */
.dhcs-pms .result-list:has(.pms-no-results) {
    max-height: none;
    flex: 1 1 0;
    min-height: 0;
}

.dhcs-pms .pms-no-results {
    display: flex;
    flex-direction: column;
    padding: 15px;
}

.dhcs-pms .result-list > .pms-result-item.pms-no-results {
    margin-left: 15px;
    margin-bottom: 15px !important;
}

.dhcs-pms .result-list.pms-empty-results {
    display: flex !important;
    flex-direction: column;
    flex: 0 0 35%;
    width: 35%;
    max-height: 552px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    background: #f2f3f3;
    margin-bottom: 20px;
    margin-right: 0;
    margin-top: 0 !important;
}

.dhcs-pms .result-list.pms-empty-results .pms-result-summary {
    flex: 0 0 auto;
}

.dhcs-pms .result-list.pms-empty-results .pms-no-results {
    flex: 1 1 auto;
    margin-bottom: 0;
}

@media screen and (max-width: 767px) {
    .dhcs-pms .result-list.pms-empty-results {
        flex: 0 0 100%;
        width: 100%;
        margin-right: 0;
    }
}

.dhcs-pms .result-list > .pms-result-item:not(.pms-no-results) {
    --pms-card-background: #fafafa;
    --pms-card-border: #d4d4d7;
    --pms-card-divider: rgb(165 189 197 / 60%);
    --pms-card-heading: #17315a;
    --pms-card-link: #2d6e8d;
    --pms-card-text: #17315a;

    background-color: var(--pms-card-background);
    border: 1px solid var(--pms-card-border);
    border-radius: 4px;
    box-shadow: 0 2px 6px 0 rgb(0 0 0 / 12%);
    color: var(--pms-card-text);
    margin: 16px 0;
    padding: 24px;
}

.dhcs-pms .pms-result-header {
    align-items: baseline;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
    justify-content: space-between;
    margin: 0 0 16px;
}

.dhcs-pms .pms-result-header .wp-block-heading {
    flex: 1 1 260px;
    margin: 0;
    min-width: 0;
    overflow-wrap: anywhere;
}

.dhcs-pms .pms-result-distance {
    flex: 0 0 auto;
    font-size: 16px;
    margin: 0;
    text-align: right;
    white-space: nowrap;
}

.dhcs-pms .pms-result-distance .fas {
    margin-right: 10px;
}

.dhcs-pms .pms-result-divider {
    border: 0;
    border-top: 1px solid var(--pms-card-divider);
    margin: 0;
}

.dhcs-pms .pms-result-details {
    display: grid;
    gap: 0 36px;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
}

.dhcs-pms .pms-result-field {
    font-size: 14px;
    line-height: 19.6px;
    margin: 14px 0 0;
    overflow-wrap: anywhere;
}

.dhcs-pms .pms-result-field a {
    color: var(--pms-card-link);
    text-decoration: underline;
}

.dhcs-pms .pms-result-languages summary {
    align-items: center;
    color: var(--pms-card-link);
    cursor: pointer;
    display: flex;
    gap: 8px;
    list-style: none;
    min-height: 24px;
    text-decoration: underline;
    width: fit-content;
}

.dhcs-pms .pms-result-languages > .pms-result-field {
    margin-top: 4px;
}

.dhcs-pms .pms-result-languages summary::-webkit-details-marker {
    display: none;
}

.dhcs-pms .pms-result-languages-icon {
    display: block;
    flex-shrink: 0;
    height: 16px;
    transform: translateY(2px) rotate(0deg);
    transition: transform 0.2s ease;
    width: 16px;
}

.dhcs-pms .pms-result-languages[open] .pms-result-languages-icon {
    transform: translateY(2px) rotate(180deg);
}

@media (prefers-reduced-motion: reduce) {

    .dhcs-pms .pms-result-languages-icon {
        transition: none;
    }
}

.dhcs-pms .pms-result-languages summary:focus-visible {
    outline: 2px solid var(--pms-card-heading);
    outline-offset: 2px;
}

.dhcs-pms .pms-result-item a:focus-visible {
    outline: 2px solid var(--pms-card-heading);
    outline-offset: 2px;
}

.dhcs-pms .screen-reader-text {
    border: 0;
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    white-space: nowrap;
    width: 1px;
}

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

    .dhcs-pms .pms-result-details {
        grid-template-columns: minmax(0, 1fr);
    }

    .dhcs-pms .result-list > .pms-result-item:not(.pms-no-results) {
        margin: 12px 0;
        padding: 16px;
    }

    .dhcs-pms .pms-result-distance {
        text-align: left;
    }
}

.dhcs-ocihsl .result-list
{
    flex: 35%;
    width: 100%;
    max-height: 552px;
    overflow-y: scroll;
    direction: rtl;
    background: #f2f3f3;
    margin-bottom: 20px;
}
.dhcs-ocihsl .result-list > *{
    background: #f9fcfc;
    padding: 1px 15px 15px 15px;
    direction: ltr;
}
.dhcs-ocihsl .result-list > *:nth-child(odd){
    background: #f2f3f3;
    padding: 1px 15px 15px 15px;
}

.dhcs-ocihsl .location-p{
    position: relative;
}
  .dhcs-ocihsl .locationSearch-form{
    margin: 0 0 30px 0;
    position: relative;
    margin-top: 20px;
  }
  /* .locationSearch-form > * {
    margin: 5px 2px;
} */
.dhcs-ocihsl #autocompleteList{
    top: initial;
    left: 2px;
    position: absolute;
    z-index: 1000;
    min-width: 10rem;
    /* padding: 0.5rem 0; */
    margin: 0;
    font-size: 1rem;
    color: #212529;
    text-align: left;
    list-style: none;
    background-clip: padding-box;
    /* border: 1px solid rgba(0,0,0,.15); */
    border-radius: 0.25rem;
    padding: 0;
  }
  .dhcs-ocihsl #autocompleteList > *{
    list-style: none;
    display: block;
    width: 100%;
    padding: 0.3rem 1rem;
    clear: both;
    font-weight: 400;
    color: #212529;
    text-align: inherit;
    text-decoration: none;
    white-space: nowrap;
    background-color: #fff;
    border-left: 1px solid rgba(0,0,0,.15);
    border-right: 1px solid rgba(0,0,0,.15);
  }
  .dhcs-ocihsl #autocompleteList > *:last-child{
    border-bottom: 1px solid rgba(0,0,0,.15);
  }

  .dhcs-ocihsl #autocompleteList > li:hover{
    background-color: rgb(243, 243, 243);
  }

  .dhcs-ocihsl #autocompleteList .selected{
    background-color: rgb(243, 243, 243);
  }

  .dhcs-ocihsl .distance-option{
    display: inherit;
  }
  .dhcs-ocihsl .distance-option span{
    margin: auto 10px;
  }
  .dhcs-ocihsl #errorMsg, .dhcs-ocihsl #errorMsg-searchAddressNearby{
    height: 19px;
    margin-bottom: -3px;
    color: red;
    flex:100%;

    position: absolute;
    top: -25px;
  }
.dhcs-ocihsl .errorborder{
    border: 2px solid red;
}


    .dhcs-ocihsl .pagination, .dhcs-ocihsl .sort-buttons{
        display: inline-flex;
        }


  .dhcs-ocihsl .pagination button{
    margin-bottom: 5px;
    padding: 0.5rem 0.9rem;
    margin-left: -1px;
    line-height: 1.25;
    color: #2d6e8d;
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-radius: 0;
}
.dhcs-ocihsl .pagination button:first-child{
    border-radius: 2px 0 0 2px;
}
.dhcs-ocihsl .pagination button:last-child{
    border-radius: 0 2px 2px 0;
}

  .dhcs-ocihsl .pagination .sort-buttons button{
    background-color: gray !important;
    display: none;
  }

  .dhcs-ocihsl .pagination {
    margin: 10px;
}
  .dhcs-ocihsl h3, .dhcs-ocihsl .h3 {
    font-size: 1.5em;
    color: #17315a !important;
    font-weight: bold;
}
.dhcs-ocihsl h1, .dhcs-ocihsl .h1 {
    font-size: 2em;
    margin: 0.67em 0;
    color: #17315A !important;
    font-weight: 700;
}

.dhcs-ocihsl .pointer{
    cursor: pointer;
}
.dhcs-ocihsl .pointer:hover{
    background-color: rgba(245, 245, 245, 0.15);
}

.dhcs-ocihsl .esri-attribution__powered-by,
.dhcs-ocihsl .esri-attribution__sources.esri-interactive {
    display: none !important;
}

.dhcs-ocihsl .mile-tag{
    color: black;
    border-radius: 14px;
    font-size: 0.75rem;
    margin-bottom: 40px;
}

.dhcs-ocihsl .searchOption > * {
    display: inline-block;
}


/* @media screen and (max-width: 768px) {
    .esri-popup__main-container {
        top: 0;
        bottom: initial !important;
    }
} */

.dhcs-ocihsl .esri-component.esri-zoom .esri-widget--button {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dhcs-ocihsl .esri-component.esri-zoom .esri-icon {
    font-size: 18px;
}

.dhcs-ocihsl #searchWidget{
    margin-top: 20px;
    @media screen and (min-width: 768px) {
        margin-top: 0px;
    }
}

/* Replace the locate-circled icon with the esri-icon-locate icon */
.dhcs-ocihsl .esri-icon-locate-circled::before {
    content: '\e630' !important; /* Unicode for esri-icon-locate */
    font-family: "CalciteWebCoreIcons" !important;
}

.dhcs-ocihsl .esri-ui .esri-popup {
    margin-bottom: 18px;
}

.dhcs-ocihsl .wp-block-button .wp-block-button__link {
    background-color: #17315a;
    border: 1px solid #17315a;
    border-radius: 4px;
    color: white;
    cursor: pointer;
    padding: 8px 16px;
    -webkit-text-decoration: none;
    text-decoration: none;
}
.dhcs-ocihsl .wp-block-button .wp-block-button__link:hover {
    box-shadow: 0 2px 4px 0 rgba(0, 0, 0, .502);
    -webkit-text-decoration: underline;
    text-decoration: underline;
}
.dhcs-ocihsl .wp-block-button.is-style-blue-outline .wp-block-button__link {
    background-color: transparent;
    border: 1px solid #17315a;
    border-radius: 4px;
    color: #17315a;
    padding: 8px 16px;
    -webkit-text-decoration: none;
    text-decoration: none;
}
.dhcs-ocihsl .wp-block-button.is-style-blue-outline .wp-block-button__link:hover {
    box-shadow: 0 2px 4px 0 rgba(0, 0, 0, .502);
    -webkit-text-decoration: underline;
    text-decoration: underline;
}
.dhcs-ocihsl .wp-block-buttons>.wp-block-button {
    display: inline-block;
    margin: 0;
}
.dhcs-ocihsl .wp-block-buttons {
    margin: 10px 0px;   
}

/* ── Search filter dropdowns ────────────────────────────── */
.dhcs-pms .pms-radius-select,
.dhcs-pms .pms-type-select,
.dhcs-pms .pms-specialty-select {
    padding: 0.375rem 2rem 0.375rem 0.75rem;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.5;
    color: #212529;
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24'><path d='M7 10l5 5 5-5z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    background-size: 1.2rem;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
}

.dhcs-pms .pms-radius-select:focus,
.dhcs-pms .pms-type-select:focus,
.dhcs-pms .pms-specialty-select:focus {
    border-color: #2d6e8d;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(45, 110, 141, 0.25);
}

.dhcs-pms .pms-radius-select:focus-visible,
.dhcs-pms .pms-type-select:focus-visible,
.dhcs-pms .pms-specialty-select:focus-visible {
    border-color: #2d6e8d;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(45, 110, 141, 0.25);
}

.dhcs-pms .pms-type-select {
    min-width: 180px;
    max-width: 260px;
}

.dhcs-pms .pms-type-select:disabled {
    background-color: white;
    cursor: not-allowed;
}

.dhcs-pms .pms-specialty-select {
    min-width: 220px;
    max-width: 320px;
}

.dhcs-pms .pms-specialty-select:disabled {
    background-color: white;
    cursor: not-allowed;
}
/* current location link style (match county search map) */
.dhcs-pms .link-styled {
    color: #2d6e8d;
    text-decoration: underline;
    cursor: pointer;
}

.dhcs-pms .link-styled:hover {
    color: darkblue;
}

.dhcs-pms .link-styled:focus{
    outline: 2px solid #005fcc;
}

.dhcs-pms .filters-results-section {
    --pms-filter-border: #d4d4d7;
    --pms-filter-heading: #17315a;
    --pms-filter-text: #17315a;
    --pms-filter-background: #fff;
    --pms-filter-focus: #005fcc;
    --pms-filter-summary: #fafafa;

    align-items: start;
    display: grid;
    gap: 36px;
    grid-template-columns: minmax(0, 1fr);
    margin: 24px 0;
}

/* Hidden until the first search, but still laid out so the ArcGIS map can initialize. */
.dhcs-pms .filters-results-section.pms-awaiting-search {
    height: 0;
    margin: 0;
    overflow: hidden;
    visibility: hidden;
}

.dhcs-pms .pms-filters,
.dhcs-pms .pms-results-column {
    min-width: 0;
}

.dhcs-pms .pms-filters-heading,
.dhcs-pms .pms-results-count {
    color: var(--pms-filter-heading);
    line-height: 32px;
    margin: 0 0 16px;
}

.dhcs-pms .filter-specialty-group {
    margin: 0;
    padding: 0;
}

.dhcs-pms .pms-filter-panel {
    background-color: var(--pms-filter-background);
    border: 1px solid var(--pms-filter-border);
    border-radius: 4px;
    margin: 0 0 8px;
}

.dhcs-pms .pms-filter-panel summary {
    background-color: var(--pms-filter-summary);
    border-radius: 4px;
    color: var(--pms-filter-heading);
    cursor: pointer;
    font-size: 16px;
    list-style: none;
    padding: 8px 48px 8px 16px;
    position: relative;
}

.dhcs-pms .pms-filter-panel summary::-webkit-details-marker {
    display: none;
}

.dhcs-pms .pms-filter-panel summary::before,
.dhcs-pms .pms-filter-panel summary::after {
    background-color: currentcolor;
    border-radius: 1px;
    content: "";
    height: 2px;
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
}

.dhcs-pms .pms-filter-panel summary::before {
    transform: translateY(-50%) rotate(90deg);
}

.dhcs-pms .pms-filter-panel[open] summary::before {
    display: none;
}

.dhcs-pms .pms-filter-panel[open] summary,
.dhcs-pms .pms-filter-panel summary:hover {
    background-color: var(--pms-filter-heading);
    color: var(--pms-filter-background);
}

.dhcs-pms .pms-filter-panel[open] summary {
    border-radius: 4px 4px 0 0;
}

.dhcs-pms .pms-filter-panel summary:focus-visible {
    outline: 2px solid var(--pms-filter-focus);
    outline-offset: 2px;
}

.dhcs-pms .pms-filter-control {
    padding: 8px 16px 16px;
}

.dhcs-pms .pms-filter-control select {
    box-sizing: border-box;
    max-width: 100%;
    min-width: 0;
    width: 100%;
}

.dhcs-pms .filters-results-section .mapview {
    box-sizing: border-box;
    min-width: 0;
}

.dhcs-pms .pms-results-toolbar {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 12px 24px;
    justify-content: space-between;
    margin: 0 0 24px;
}

.dhcs-pms .pms-results-toolbar[hidden] {
    display: none;
}

.dhcs-pms .pms-results-count {
    margin: 0;
}

.dhcs-pms .pms-view-toggle {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.dhcs-pms .pms-view-button {
    background-color: transparent;
    border: 0;
    border-radius: 0;
    color: var(--pms-filter-text);
    cursor: pointer;
    font-size: 16px;
    font-weight: 400;
    line-height: 24px;
    min-height: 44px;
    padding: 8px 0;
    text-decoration: none;
    text-underline-offset: 5px;
}

.dhcs-pms .pms-view-button[aria-pressed="true"] {
    color: var(--pms-filter-heading);
    font-weight: 700;
    text-decoration: underline;
    text-decoration-thickness: 3px;
}

.dhcs-pms .pms-view-button:focus-visible {
    outline: 2px solid var(--pms-filter-focus);
    outline-offset: 2px;
}

/* List view: only the result list. The map stays visible while a search is loading. */
.dhcs-pms .map-results.has-results[data-pms-view="list"]:not(.pms-map-loading) .mapview {
    display: none;
}

.dhcs-pms .map-results.has-results[data-pms-view="list"]:not(.pms-map-loading) .result-list {
    flex: 1 1 100%;
    height: auto;
    max-height: none;
    overflow-y: visible;
    scrollbar-gutter: auto;
    width: 100%;
    margin-top: -16px;
}

.dhcs-pms .map-results[data-pms-view="list"] .pms-pagination {
    position: static;
}

/* Map view: only the map, which grows to fill the row once the list is hidden. */
.dhcs-pms .map-results.has-results[data-pms-view="map"] .result-list {
    display: none !important;
}

@media screen and (min-width: 768px) {

    .dhcs-pms .filters-results-section {
        grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
        row-gap: 24px;
    }

    .dhcs-pms .pms-filters,
    .dhcs-pms .pms-results-column {
        display: grid;
        grid-row: 1 / span 2;
        grid-template-rows: subgrid;
    }

    .dhcs-pms .pms-filters-heading {
        align-self: end;
        margin: 0;
    }

    .dhcs-pms .pms-results-toolbar {
        align-items: flex-end;
        margin: 0;
    }
}

.dhcs-pms .esri-search__submit-button {
    padding: 0 20px;
    margin-right: -30px;
}

.dhcs-pms .form-control {
    display: block;
    padding: .375rem .75rem;
    margin-left: 0;
    width: 100%;
    font-weight: 400;
    line-height: 1.5;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #dee2e6;
    appearance: none;
    border-radius: 0.25rem;
    transition: border-color .15s ease-in-out,box-shadow .15s ease-in-out
}

.dhcs-pms #cityZipSearchInput:focus,
.dhcs-pms #cityZipSearchInput:focus-visible,
.dhcs-pms .pms-provider-input-wrap .form-control:focus,
.dhcs-pms .pms-provider-input-wrap .form-control:focus-visible,
.dhcs-pms .locationSearch-form #SearchButton:focus,
.dhcs-pms .locationSearch-form #SearchButton:focus-visible {
    outline: 2px solid #000;
    outline-offset: 2px;
}

.dhcs-pms .location-search-section,
.dhcs-pms .pms-filters {
    --pms-search-background: #eff6ff;
    --pms-search-border: #d4d4d7;
}

.dhcs-pms .location-search-section {
    --pms-search-button: #17315a;
    --pms-search-button-hover: #335969;
    --pms-search-error: #c51919;
    --pms-search-text: #17315a;
    --pms-search-white: #fff;

    background-color: var(--pms-search-background);
    border: 1px solid var(--pms-search-border);
    border-radius: 4px;
    color: var(--pms-search-text);
    margin: 20px 0 0;
    padding: 24px;
}

.dhcs-pms .pms-category-label {
    color: #17315a;
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 12px;  
}

.dhcs-pms .location-search-section .pms-category-tabs {
    margin: 0 0 44px;
}

.dhcs-pms .location-search-section .locationSearch-form {
    align-items: flex-end;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin: 0;
    width: 100%;
}

.dhcs-pms .location-search-section label {
    display: block;
    font-weight: 700;
}

.dhcs-pms .location-search-section .form-control {
    box-sizing: border-box;
    font-size: 16px;
    margin: 6px 0;
    min-height: 44px;
    min-width: 0;
}

/* City/ZIP autocomplete wrapper grows to fill its share */
.dhcs-pms .locationSearch-form .pms-autocomplete-wrap {
    display: flex;
    flex: 1 1 280px;
    flex-direction: column;
    max-width: 400px;
    min-width: 0;
}

/* Search button stays at its natural size */
.dhcs-pms .locationSearch-form #SearchButton {
    background-color: var(--pms-search-button) !important;
    border: 1px solid var(--pms-search-button);
    border-radius: 4px;
    color: var(--pms-search-white) !important;
    flex: 0 0 auto;
    line-height: 24px;
    min-height: 44px;
    padding: 8px 16px;
}

.dhcs-pms .location-search-section .pms-search-button::before {
    content: "\f002";
    display: inline-block;
    font-family: "Font Awesome 6 Free", sans-serif;
    font-weight: 900;
    margin-right: 8px;
}

.dhcs-pms .location-search-section .pms-search-button:hover:not(:disabled) {
    background-color: var(--pms-search-button-hover) !important;
    text-decoration: underline !important;
}

.dhcs-pms .location-search-section .pms-search-button:disabled {
    cursor: not-allowed;
    opacity: 0.65;
}

/* Reserve a line for validation without clipping longer messages. */
.dhcs-pms .locationSearch-form #errorMsg,
.dhcs-pms .pms-provider-error {
    color: var(--pms-search-error);
    display: block;
    font-size: 0.75rem;
    line-height: 18px;
    margin: 0 0 5px;
    min-height: 18px;
    visibility: hidden;
}

.dhcs-pms .locationSearch-form #errorMsg:not(:empty),
.dhcs-pms .pms-provider-error:not(:empty) {
    visibility: visible;
}

.dhcs-pms .locationSearch-form:has(#errorMsg-provider:not(:empty)) #cityZipSearchInput,
.dhcs-pms .locationSearch-form:has(#errorMsg-provider:not(:empty)) #providerSpecialtySearchInput {
    border-color: #c51919 !important;
    box-shadow: 0 0 0 1px #c51919 !important;
}

.dhcs-pms .pms-provider-input-wrap {
    display: flex;
    flex: 1 1 280px;
    flex-direction: column;
    max-width: 400px;
    min-width: 0;
    position: relative;
}

.dhcs-pms .pms-provider-input-wrap #providerSpecialtySearchInput {
    flex: unset;
    width: 100%;
    max-width: 100%;
}

.dhcs-pms .errorborder {
    border-color: #c51919 !important;
    box-shadow: 0 0 0 1px #c51919 !important;
}

@media (min-width: 768px) {

    .dhcs-pms .location-search-section .locationSearch-form {
        align-items: stretch;
        column-gap: 20px;
        display: grid;
        grid-template-columns: minmax(0, 400px) minmax(0, 400px) max-content;
        row-gap: 0;
    }

    /* Share label, input, and error rows so wrapping text cannot shift the controls. */
    .dhcs-pms .locationSearch-form .pms-autocomplete-wrap,
    .dhcs-pms .locationSearch-form .pms-provider-input-wrap {
        display: grid;
        grid-row: 1 / span 3;
        grid-template-rows: subgrid;
    }

    .dhcs-pms .location-search-section label {
        margin: 0;
    }

    .dhcs-pms .locationSearch-form .pms-search-button {
        align-self: center;
        grid-column: 3;
        grid-row: 2;
        margin: 0;
    }
}

/* Mobile: stack each field on its own row */
@media (max-width: 767px) {

    .dhcs-pms .location-search-section {
        padding: 16px;
    }

    .dhcs-pms .pms-filters {
        background-color: var(--pms-search-background);
        border: 1px solid var(--pms-search-border);
        border-radius: 4px;
        padding: 16px;
    }

    .dhcs-pms .locationSearch-form .pms-autocomplete-wrap,
    .dhcs-pms .pms-provider-input-wrap {
        flex: 0 0 100%;
        max-width: 400px;
        width: 100%;
    }

    .dhcs-pms .locationSearch-form #SearchButton {
        flex: 0 0 100%;
        max-width: 100%;
        width: 100%;
    }

    .dhcs-pms .locationSearch-form .form-control {
        width: 100%;
        margin-left: 0;
    }
}

.dhcs-pms .btn-primary {
    background-color: #2d6e8d !important;
    color: white !important;
    -webkit-transition: all 0.5s;
    transition: all 0.5s;
}

.dhcs-pms .btn-primary:hover {
    background-color: #335969 !important;
    color: white !important;
}

.dhcs-pms .btn {
    /* width: 100%; */
    display: inline-block;
    margin-bottom: 0;
    font-weight: normal;
    text-align: center;
    vertical-align: middle;
    -ms-touch-action: manipulation;
    touch-action: manipulation;
    cursor: pointer;
    background-image: none;
    border: 1px solid transparent;
    white-space: nowrap;
    padding: 6px 12px;
    font-size: 16px;
    line-height: 1.42857143;
    border-radius: 0.25rem;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    text-decoration: none !important;
    border-radius: 7px;
    font-weight: 600;
    transition: color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;
}

.dhcs-pms #UseCurrentButton {
    padding: 10px 0px;
    color: #757575;
    font-size: 1em;
    margin-left: 15px;
    cursor: pointer;
}
.dhcs-pms .esri-icon-locate {
    font-size: 0.8em;
}
.dhcs-pms .esri-attribution {
    display: none !important;
}

.dhcs-pms .esri-attribution__powered-by,
.dhcs-pms .esri-attribution__sources.esri-interactive {
    display: none !important;
}

.dhcs-pms #searchAddressNearbySearching {
    display: none !important;
}

.dhcs-pms .pms-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px;
    /* border-top: 1px solid #d9d9d9;
    background: #f2f3f3; */
    /* position: sticky; */
    bottom: 0;
    z-index: 2;
    /* border-top: 1px solid #d0dde4; */
}

.dhcs-pms .pms-page-btn {
    border: 1px solid #2d6e8d;
    background: #fff;
    color: #2d6e8d;
    border-radius: 4px;
    padding: 4px 10px;
    cursor: pointer;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    line-height: 1.2;
}

.dhcs-pms .pms-page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.dhcs-pms .pms-page-btn-hidden {
    display: none;
}

.dhcs-pms .pms-result-summary {
    color: #444;
    padding: 12px;
    background: #f2f3f3;
    border-bottom: 1px solid #d0dde4;
    position: sticky;
    top: 0;
    z-index: 3;
    text-align: center;
}

.dhcs-pms .pms-page-numbers {
    display: flex;
    align-items: center;
    gap: 3px;
    flex: 1 1 auto;
    justify-content: center;
    flex-wrap: wrap;
}

.dhcs-pms .pms-page-num-btn {
    min-width: 28px;
    height: 28px;
    padding: 0 5px;
    border: 1px solid #c8d8e0;
    background: #fff;
    color: #2d6e8d;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s;
}

.dhcs-pms .pms-page-num-btn:hover {
    background: #e6f0f5;
}

.dhcs-pms .pms-page-num-btn.pms-page-num-active {
    /* background: #2d6e8d;
    color: #fff;
    border-color: #2d6e8d; */
    font-weight: 700;
    cursor: default;
}

.dhcs-pms .pms-page-ellipsis {
    font-size: 0.85rem;
    color: #888;
    padding: 0 2px;
    line-height: 1;
    user-select: none;
}

.dhcs-pms .pms-page-status {
    font-size: 0.75rem;
    color: #2d2d2d;
    text-align: center;
    flex: 1 1 80px;
}
.dhcs-pms .pms-page-arrow {
    font-size: 1rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    line-height: 1;
}

.dhcs-pms .pms-page-arrow-prev {
    transform: rotate(180deg);
}

.dhcs-pms .pms-page-btn-text {
    font-size: 0.88rem;
}

.dhcs-pms .pms-pagination-loading {
    justify-content: center;
}

.dhcs-pms .pms-pagination-loading .pms-page-status {
    flex: 0 1 auto;
}

.dhcs-pms .pms-pagination button {
    background: none;
    border: 0;
}

/* City/ZIP autocomplete */
.dhcs-pms .pms-autocomplete-wrap {
    width: 100%;
}

.dhcs-pms .pms-autocomplete-input {
    margin: 6px 0;
    min-width: 0;
    position: relative;
}

.dhcs-pms .location-search-section .pms-autocomplete-input .form-control {
    margin: 0;
}

.dhcs-pms .pms-autocomplete-list {
    box-sizing: border-box;
    position: absolute;
    z-index: 1000;
    top: calc(100% + 2px);
    left: 0;
    width: 100%;
    max-width: 500px;
    margin: 0;
    padding: 0;
    list-style: none;
    background: #fff;
    border: 1px solid rgba(0,0,0,.15);
    border-radius: 0.25rem;
    display: none;
    max-height: 220px;
    overflow-y: auto;
}

.dhcs-pms .pms-autocomplete-item {
    padding: 0.45rem 0.75rem;
    cursor: pointer;
    border-bottom: 1px solid rgba(0,0,0,.08);
}

.dhcs-pms .pms-autocomplete-item:last-child {
    border-bottom: 0;
}

.dhcs-pms .pms-autocomplete-item:hover,
.dhcs-pms .pms-autocomplete-item.selected {
    background: #f3f3f3;
}

.dhcs-pms .esri-widget__heading,
.dhcs-pms .esri-popup__header-title {
    text-transform: uppercase;
    font-size: 1rem !important;
    line-height: normal;
}

.dhcs-pms .esri-popup__main-container{
    font-size: 1rem;
    line-height: normal;
}
.dhcs-pms .esri-popup__content p{
    font-size: 1rem;
}

/* Placeholder text color */
.dhcs-pms .form-control::placeholder {
    color: #696A6A;
    opacity: 1;
}

.dhcs-pms .form-control::-webkit-input-placeholder {
    color: #696A6A;
    opacity: 1;
}

.dhcs-pms .form-control:-ms-input-placeholder {
    color: #696A6A;
    opacity: 1;
}

/* Use My Location text color */
.dhcs-pms #UseCurrentButton{
    color: #696A6A;
}

.dhcs-pms .esri-popup__header-container--button{
    padding-top: 10px;
}

.dhcs-pms #UseCurrentButton {
 display: none;
}

.dhcs-pms .pms-category-tabs {
    --pms-tabs-heading: #17315a;
    --pms-tabs-text: #17315a;
    --pms-tabs-background: #fafafa;
    --pms-tabs-border: #d4d4d7;

    margin: 0 0 24px;
}

.dhcs-pms .pms-category-tablist {
    border-bottom: 1px solid var(--wp--preset--color--grayish-blue-60);
    display: flex;
    flex-wrap: wrap;
    gap: 16px 48px;
}

.dhcs-pms .pms-category-tab {
    align-items: center;
    background-color: transparent;
    border: 0;
    border-bottom: 4px solid transparent;
    color: var(--pms-tabs-text);
    cursor: pointer;
    display: inline-flex;
    font-family: inherit;
    font-size: 22.5px;
    font-weight: 400;
    line-height: 32px;
    padding: 0 0 16px;
    white-space: nowrap;
}

.dhcs-pms .pms-category-tab[aria-selected="true"] {
    border-bottom-color: var(--pms-tabs-heading);
    color: var(--pms-tabs-heading);
    font-weight: 700;
}

.dhcs-pms .pms-category-tab > i {
    margin-right: 10px;
}

.dhcs-pms .pms-category-tab .pms-category-tab-icon {
    display: block;
    height: 1em;
    margin-right: 10px;
    object-fit: contain;
    vertical-align: middle;
    width: 1em;
    font-size: 1.2rem;
}

.dhcs-pms .pms-category-tab:focus-visible {
    outline: 2px solid var(--pms-tabs-heading);
    outline-offset: 4px;
}

.dhcs-pms .pms-category-select {
    background-color: var(--pms-tabs-background);
    border: 1px solid var(--pms-tabs-border);
    box-sizing: border-box;
    color: var(--pms-tabs-heading);
    display: none;
    font-family: inherit;
    font-size: 20px;
    font-weight: 700;
    min-height: 56px;
    padding: 16px;
    width: 100%;
}

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

    .dhcs-pms .pms-category-tablist {
        display: none;
    }

    .dhcs-pms .pms-category-select {
        display: block;
    }
}


.dhcs-pms .pms-filter-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dhcs-pms .pms-filter-option {
    align-items: start;
    cursor: pointer;
    display: grid;
    font-size: 14px;
    gap: 8px;
    grid-template-columns: 18px minmax(0, 1fr) auto;
    line-height: 20px;
}

.dhcs-pms .pms-filter-option input {
    accent-color: var(--pms-filter-heading);
    cursor: pointer;
    height: 18px;
    margin: 1px 0 0;
    width: 18px;
}

.dhcs-pms .pms-filter-option input:focus-visible {
    outline: 2px solid var(--pms-filter-focus);
    outline-offset: 2px;
}

.dhcs-pms .pms-filter-option:has(input:disabled) {
    cursor: not-allowed;
    opacity: 0.65;
}

.dhcs-pms .pms-filter-option input:disabled {
    cursor: not-allowed;
}

.dhcs-pms .pms-filter-option-text {
    overflow-wrap: anywhere;
}

.dhcs-pms .pms-filter-option-count {
    white-space: nowrap;
}
