/* address form */
#content label {
    font-weight: bold;
}

.form_container {
    max-width: 40rem;
    margin: 0 auto 4rem;
}

@media all and (min-width: 768px) {
    .form_container {
        max-width: 64rem;
        margin: 0 auto 4rem;
    }
}

#address_form .internal_pin {
    position: relative;
    /* margin-top: 1rem; */
}

#address_form #map_geolocation {
    position: absolute;
    top: 1.2rem;
    font-size: 2rem;
    left: 1rem;
    color: #737373;
}

#address_form #address {
    /* width: 100%; */
    max-width: 45rem;
    padding-left: 4rem;
    margin-bottom: 2rem;
}
#address_form .select-box {
    margin-bottom: 2rem;
}
@media all and (min-width: 768px) {
    #address_form {
        padding: 2rem 0;
    }

    #address_form label {
        display: inline;
    }

    #address_form .input_fields {
        display: flex;
        margin-top: 1rem;
        /* align-items: center; */
    }

    #address_form .internal_pin {
        width: 100%;
        margin-right: 1rem;
    }
}

#address_form .autocomplete.icon-close {
    background-color: transparent;
    position: absolute;
    z-index: 1;
    right: 1rem;
    top: 0;
    margin: auto;
    padding: 0;
}

@media all and (min-width: 768px) {
    #address_form .autocomplete.icon-close {
        right: 40px;
    }
}

#address_form .autocomplete.icon-close:before {
    font-size: 12px;
}

/* map */
.result_container {
    position: relative;
}

#mapDiv {
    height: 0;
}
#legend {
    display: none;
    width: 100%;
    position: relative;
    text-align: center;
    font-size: 1.4rem;
}
#legend.show{
    display: block;
}
#legend span{
    margin: 1rem;
}
#legend img{
    max-width: 2rem;
    margin: 0.5rem;
}
@media all and (min-width: 768px) {
    #legend {
        position: absolute;
        bottom: -4rem;
    }
}
#mapDiv.result {
    height: 20rem;
    transition: height 0.3s;
}

@media all and (min-width: 480px) {
    #mapDiv.result {
        height: 30rem;
    }
}

@media all and (min-width: 768px) {
    #mapDiv.result {
        position: absolute !important;
        right: 0;
        height: 100%;
        max-height: calc(100vh - 4rem);
        width: calc(100% - 37rem);
        float: right;
    }

    #mapDiv.result.fixed {
        position: fixed !important;
        top: 2rem;
        right: 3rem;
        width: calc(100% - 43rem);
        height: calc(100% - 4rem);
        max-height: none;
    }

    #mapDiv.result.bottom {
        position: absolute !important;
        bottom: 2rem;
    }
}

@media all and (min-width: 1000px) {
    #mapDiv.result {
        max-height: calc(100vh - 10rem);
    }

    #mapDiv.result.fixed {
        top: 8rem;
        height: calc(100% - 10rem);
    }
}

@media all and (min-width: 1017px) {
    #mapDiv.result.fixed {
        /* keep map within container max width */
        right: calc(((100% - 101.7rem)/2) + 3rem); /* calculate right position + container padding-right (3rem) */
        width: calc(101.7rem - 43rem); /* calculate width of map by taking container width and subtracting result cards wdith + margin */
    }
}

/* Dark mode adjustment */
.dark .gm-style .gm-style-iw-c {
    background-color: #2B2B2C;
}
.dark .gm-style .gm-style-iw-t::after {
    background: linear-gradient(45deg,rgb(43, 43, 44) 50%,rgba(43,43,44,0) 51%,rgba(43,43,44,0) 100%) #2b2b2c;
}

/* map listings */
#map_listing {
    margin-top: 2rem;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

@media all and (min-width: 768px) {
    #map_listing {
        margin-top: 0;
    }
}
#map_listing .geico-local-office{
    display: flex;
    flex-direction:column;
    color:#154995;
    font-size: 1.4rem;
}
/* Dark mode adjustment */
.dark #map_listing .geico-local-office{
    color:#fff;
}
#map_listing .icon-geico{
    font-size: 10rem;
    line-height: 2rem;
}
#map_listing .icon-alert + p {
    margin: 0 0 0 2rem;
    width: calc(100% - 8rem);
}

.loading_marker {
    display: none;
}

.loading_marker.show {
    display: block;
    padding: 0 45%;
}

.error_container {
    display: flex;
    align-items: center;
    max-width: 40rem;
    margin: 0 auto;
}

@media all and (min-width: 768px) {
    .error_container {
        max-width: 64rem;
    }
}

#content .cards p {
    margin: 0;
}

.cards {
    width: 100%;
    max-width: 40rem;
    margin: 0 auto;
}

@media all and (min-width: 768px) {
    .cards {
        max-width: 35rem;
        margin: 0;
    }
}

.card {
    border: 1px solid #d7d7d7;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 1rem 1.5rem -1rem rgba(0, 0, 0, 0.2);
    margin-bottom: 2rem;
}

.card.selected {
    border-color: #3773ca;
    box-shadow: 0 1rem 1.5rem -1rem rgba(0, 0, 0, 0.2), 0 0 0.5rem 0.1rem #3773ca;
}
.card.agency.selected {
    border-color: #EF5621;
    box-shadow: 0 1rem 1.5rem -1rem rgba(0, 0, 0, 0.2), 0 0 0.5rem 0.1rem #EF5621;
}
.back-link {
    display: none;
    margin-bottom: 2rem;
    cursor: pointer;
    color: #154995;
    text-decoration: underline;
}

.back-link .icon {
    display: inline-block;
    transform: rotate(90deg);
    margin-right: 0.5rem;
    position: relative;
    top: 2px;
}

.card.selected .back-link {
    display: inline-block;
}
#Agency_sobCode{
    display: none;
}
@media all and (min-width: 768px) {
    .card.selected .back-link {
        display: none;
    }
}

.card-heading {
    display: flex;
    align-items: center;
    margin-bottom: 2rem;
}

.card-heading .image-crop {
    display: inline-block;
    width: 6rem;
    height: 6rem;
    overflow: hidden;
    border-radius: 50%;
    margin-right: 1rem;
}

.card-heading .image-crop img {
    width: 100%;
}

#content .card-heading p {
    /* margin-left: 1rem; */
    flex: 1;
}

.card .btn {
    float: right;
    margin-bottom: 0;
}

.card form {
    display: flex;
    align-items: center;
    margin-bottom: 2rem;
}

.card form hr {
    display: block;
    width: 100%;
    margin-right: 1.5rem;
}

.phone-btn {
    display: none;
}

html[data-ismobilephone="1"] .card-heading .phone {
    display: none;
}

html[data-ismobilephone="1"] .card form {
    margin-bottom: 0;
}

html[data-ismobilephone="1"] .card form hr {
    display: none;
}

html[data-ismobilephone="1"] .phone-btn {
    display: block;
}

html[data-ismobilephone="1"] .card .btn {
    float: none;
    margin-bottom: 1rem;
    width: 100%;
    text-align: center;
}

#map_listing .card .address {
    margin: 1rem 0;
}

.hours-info {
    display: none;
}

.hours-info div {
    margin-bottom: 1rem;
}

/* gas listings */
.gasListing {
    margin-bottom: 1rem;
}

.gasRow {
    display: flex;
    align-items: center;
}

.firstGas {
    font-weight: bold;
}

.gasPrice {
    width: 6rem;
}

.gasName {
    width: 10rem;
}

.gasDate {
    font-size: 1.2rem;
}

/* map sorting */
#map_sorting {
    display: none;
    margin: 2rem auto;
    max-width: 40rem;
}

#map_sorting.show {
    display: flex;
    justify-content: flex-end;
}

#map_sorting > * {
    margin-left: 1rem;
}

@media all and (min-width: 768px) {
    #map_sorting {
        margin: 2rem 0;
        max-width: 35rem;
    }
}

.sort-link {
    text-decoration: none;
}

.sort-link .sort-label,
.sort-link span[class^="icon-"] {
    color: #222;
}
/* Dark mode adjustment */
.dark .sort-link .sort-label,
.dark .sort-link span[class^="icon-"] {
    color: #fff;
}
.sort-link span[class="icon-chevron-up"],
.sort-link span[class="icon-chevron-down"]  {
    display: none;
    font-size: 1.3rem;
    margin-left: 0.2rem;
}

.sort-link.selected .sort-label {
    font-weight: bold;
    text-decoration: underline;
}

.sort-link.selected span[class="icon-chevron-unsorted"] {
    display: none;
}

.sort-link.selected[data-sort-order="ascending"] span[class="icon-chevron-up"] {
    display: inline;
}

.sort-link.selected[data-sort-order="descending"] span[class="icon-chevron-down"] {
    display: inline;
}

