/* Locations Module Styles */

.lfilter {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 3rem;
}

.lsearch {
    display: flex;
    gap: 1rem;
}

/* Search field, city select and type dropdown share one pill style */
.lsearch input,
.lsearch select,
.ltypes-toggle {
    box-sizing: border-box;
    margin: 0;
    padding: 1rem 1.25rem;
    font-size: 1rem;
    font-family: inherit;
    line-height: 1.5;
    color: inherit;
    background-color: #fff;
    border: 1px solid #dfe3d6;
    border-radius: 3rem;
}

.lsearch input:focus-visible,
.lsearch select:focus-visible,
.ltypes-toggle:focus-visible {
    outline: 2px solid #80bc00;
    outline-offset: 2px;
}

/* Same green chevron as the type dropdown */
.lsearch select {
    padding-right: 3.25rem;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2380bc00' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6l6 -6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1.25rem center;
}

input[type=checkbox].locations-type-filter {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid #00a0df;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  position: relative;
  vertical-align: middle;
}

input[type=checkbox].locations-type-filter:checked {
  background: #00a0df;
}

input[type=checkbox].locations-type-filter:checked::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 0px;
  width: 5px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

input[type=checkbox].locations-type-filter:focus-visible {
  outline: 2px solid #00a0df;
  outline-offset: 2px;
}

.ltypes {
    position: relative;
    margin-right: auto;
}

.ltypes-toggle {
    display: flex;
    align-items: center;
    gap: .75rem;
    cursor: pointer;
    white-space: nowrap;
}

.ltypes-chevron {
    flex-shrink: 0;
    color: #80bc00;
    transition: transform .2s ease;
}

.ltypes-toggle[aria-expanded="true"] .ltypes-chevron {
    transform: rotate(180deg);
}

/* z-index above the Leaflet map panes/controls */
.ltypes-panel {
    position: absolute;
    top: calc(100% + .5rem);
    left: 0;
    z-index: 1001;
    display: grid;
    gap: .75rem;
    min-width: 100%;
    padding: 1.25rem 1.5rem;
    background-color: #fff;
    border: 2px solid #dfe3d6;
    border-radius: 1.5rem;
    box-shadow: 0 0 30px #efefef;
}

.ltypes-panel[hidden] {
    display: none;
}

.ltypes-panel label {
    display: flex;
    align-items: center;
    gap: .75rem;
    white-space: nowrap;
    cursor: pointer;
}

.lgrid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 2rem;
}

.lcol {
    display: flex;
    flex-direction: column;
}

.litem {
    border-radius: 2rem;
    overflow: hidden;
    background-color: #ffffff;
    box-shadow: 0 0 30px #efefef;
    border: 2px solid #dfe3d6;
    display: flex;
    flex-direction: column;
    position: relative;
    height: 100%;
}

.ltype {
    font-size: .925rem;
    padding: .25rem 1rem;
    border-radius: 3rem;
    display: inline-block;
    margin-bottom: .5rem;
    position: absolute;
    top: 2rem;
    left: 2rem;
    font-weight: 600;
    z-index: 2;
    color: #80bc00;
    background-color: #f4f8ed;
}

.lmedia {
    height: 250px;
    overflow: hidden;
    position: relative;
}

.limage-placeholder {
    height: 100%;
    background-color: #efefef;
    display: flex;
    align-items: center;
    justify-content: center;
}

.limage-placeholder .icon {
    width: 50px;
    height: 50px;
    opacity: .5;
}

.limage {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.lcontent {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.ltitle {
    font-size: 1.5rem;
    font-weight: 600;
    font-family: var(--et_global_heading_font);
    margin-top: 0;
    margin-bottom: 0.5rem;
    color: #80bc00;
}

.llist {
    list-style: none;
    padding: 0 !important;
    margin: 1rem 0;
    display: grid;
    gap: .5rem;
    font-size: 1rem;
}

.llist li {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.llist li a {
    color: inherit;
    text-decoration: none;
}

.llist li a:hover {
    text-decoration: underline;
}

.licon {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background-color: #f4f8ed;
    color: #80bc00;
}

.lview {
    padding: .25rem;
    border-radius: 3rem;
    background-color: #fff;
    display: flex;
}

.lview-btn {
    padding: .75rem 1.5rem;
    background-color: #fff;
    border: 1px solid #fff;
    border-radius: 3rem;
    display: flex;
    gap: .5rem;
    align-items: center;
    font-family: inherit;
    font-size: 1rem;
    color: #1a171c; /* iOS Safari colours buttons blue without this */
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}

.lview-btn.is-active {
    color: #fff;
    background-color: #80bc00;
    border: 1px solid #80bc00;
}

.lbuttons {
    display: grid;
    gap: .5rem;
}

.btn {
    padding: .75rem 1.5rem;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    color: #ffffff;
    border-radius: 3rem;
    align-items: center;
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn-green {
    background-color: #80bc00;
}

.btn-green-ghost {
    background-color: #f4f8ed;
    color: #80bc00;
}

.btn-blue {
    background-color: #00a0df;
}

.btn-blue-text {
    background-color: transparent;
    color: #00a0df;
    padding: 0 1.5rem;
}

.btn-orange {
    background-color: #ff671d;
}

.btn-orange-text {
    background-color: transparent;
    color: #ff671d;
    padding: 0 1.5rem;
}

.btn-purple {
    background-color: #9b26b6;
}

.btn-purple-text {
    background-color: transparent;
    color: #9b26b6;
    padding: 0 1.5rem;
}

.label-green {
    color: #80bc00;
    font-weight: 600;
}

.label-orange {
    color: #ff671d;
    font-weight: 600;
}

.label-blue {
    color: #00a0df;
    font-weight: 600;
}

.label-purple {
    color: #9b26b6;
    font-weight: 600;
}

@media (max-width: 980px) {
    .lgrid {
        grid-template-columns: 1fr 1fr;
    }
    .lfilter {
        flex-wrap: wrap;
    }
}

@media (max-width: 640px) {
    .lgrid {
        grid-template-columns: 1fr;
    }
    .lsearch {
        width: 100%;
    }
    .lsearch input,
    .lsearch select {
        flex: 1 1 0;
        min-width: 0;
    }
    .ltypes-panel label {
        white-space: normal;
    }
    .lmap-wrapper {
        height: 450px;
    }
}

/* Search */

.lhsearch {
    display: flex;
    align-items: flex-end;
    gap: 1rem;
    padding: 1.5rem;
    background-color: #ffffff;
    border: 2px solid #dfe3d6;
    border-radius: 2rem;
}

.lhsearch-field {
    display: flex;
    flex-direction: column;
    gap: .4rem;
    flex: 1 1 0;
    min-width: 0;
}

.lhsearch-field label {
    font-size: .925rem;
    font-weight: 600;
    color: #80bc00;
    padding-left: 1rem;
}

.lhsearch-field select {
    width: 100%;
    padding: 1rem 2.75rem 1rem 1rem;
    font-size: 1rem;
    border: 1px solid #dfe3d6;
    border-radius: 3rem;
    background-color: #f4f8ed;
    color: inherit;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2380bc00' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6l6 -6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
}

.lhsearch-field select:focus-visible {
    outline: 2px solid #80bc00;
    outline-offset: 2px;
}

.lhsearch-btn {
    border: 0;
    font-size: 1rem;
    font-family: inherit;
    cursor: pointer;
    padding: 1rem 1.5rem;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .lhsearch {
        flex-direction: column;
        align-items: stretch;
    }
}

/* [locations_search variant="footer"]: no background block, labels only for screen readers */
.lhsearch--footer {
    padding: 0;
    background: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    align-items: center;
    gap: .75rem;
}

.lhsearch--footer .lhsearch-field label {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.lhsearch--footer .lhsearch-field select {
    padding-top: .85rem;
    padding-bottom: .85rem;
    background-color: #fff;
    color: var(--des-ink);
    font-family: var(--des-body);
}

.lhsearch--footer .lhsearch-btn {
    padding: .85rem 1.5rem;
}

/* Mobile: dropdowns and button full width, stacked (same as the regular search) */
@media (max-width: 768px) {
    .lhsearch--footer {
        align-items: stretch;
    }

    .lhsearch--footer .lhsearch-btn {
        justify-content: center;
    }
}

/* The footer is green: white focus ring instead of green */
.lhsearch--footer .lhsearch-field select:focus-visible,
.lhsearch--footer .lhsearch-btn:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* Map */

.lgrid.is-hidden {
    display: none !important;
}

.lmap-wrapper {
    display: none;
    width: 100%;
    height: 600px;
    border-radius: 1.5rem;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.08);
    background-color: #f7f9fc;
}

.lmap-wrapper.is-active {
    display: block;
}

.lmap {
    width: 100%;
    height: 100%;
    z-index: 1;
}

.lmap .leaflet-tile-pane {
    filter: saturate(0.85) contrast(1.02);
}

.custom-marker-icon {
    background: transparent;
    border: none;
}

.marker-pin-svg {
    filter: drop-shadow(0 4px 8px rgba(26, 23, 28, 0.25));
    transition: transform 0.2s ease;
    cursor: pointer;
}

.marker-pin-svg:hover {
    transform: scale(1.12);
}

.custom-cluster-container {
    background: transparent;
    border: none;
}

.custom-cluster-badge {
    width: 42px;
    height: 42px;
    background-color: #80bc00;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 15px;
    box-shadow: 0 4px 14px rgba(26, 23, 28, 0.25);
    border: 3px solid rgba(255, 255, 255, 0.85);
    transition: transform 0.2s ease, background-color 0.2s ease;
    cursor: pointer;
}

.custom-cluster-badge:hover {
    transform: scale(1.1);
    background-color: #6fa300;
}

.custom-map-popup .leaflet-popup-content-wrapper {
    background: #ffffff;
    border-radius: 1.5rem;
    box-shadow: 0 16px 36px rgba(26, 23, 28, 0.12);
    padding: 0;
    overflow: visible;
}

.custom-map-popup .leaflet-popup-content {
    margin: 0;
    padding: 2rem 2.25rem 1.75rem;
    text-align: center;
    min-width: 260px;
    max-width: 320px;
    font-family: inherit;
}

.custom-map-popup .leaflet-popup-tip-container {
    overflow: visible;
}

.custom-map-popup .leaflet-popup-tip {
    background: #ffffff;
    box-shadow: 0 4px 10px rgba(26, 23, 28, 0.08);
}

.custom-map-popup .leaflet-popup-close-button {
    top: -12px !important;
    right: -12px !important;
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    background-color: #80bc00 !important;
    color: #ffffff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 22px !important;
    font-weight: 400 !important;
    line-height: 1 !important;
    padding: 0 !important;
    box-shadow: 0 4px 12px rgba(26, 23, 28, 0.25) !important;
    text-decoration: none !important;
    transition: transform 0.2s ease, background-color 0.2s ease !important;
    z-index: 100 !important;
}

.custom-map-popup .leaflet-popup-close-button:hover {
    background-color: #6fa300 !important;
    color: #ffffff !important;
    transform: scale(1.08) !important;
}

.lmap-popup-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #80bc00;
    margin: 0 0 1rem 0;
    line-height: 1.3;
}

.lmap-popup-address {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    margin-bottom: 1.5rem;
    color: #556277;
    font-size: 0.925rem;
}

.lmap-popup-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background-color: #f4f8ed;
    color: #80bc00;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.lmap-popup-btn {
    display: inline-block;
    width: 100%;
    padding: 0.75rem 1.5rem;
    border-radius: 3rem;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

/* Several types at one address: buttons stacked */
.lmap-popup-btns {
    display: grid;
    gap: .5rem;
}

/* Button colour per care type (class set in locations.js from btn_class) */
.lmap-popup-btn.is-green  { --pb: #80bc00; --pb-tint: #f4f8ed; }
.lmap-popup-btn.is-orange { --pb: #ff671d; --pb-tint: #fff2eb; }
.lmap-popup-btn.is-blue   { --pb: #00a0df; --pb-tint: #eaf6fc; }
.lmap-popup-btn.is-purple { --pb: #9b26b6; --pb-tint: #f5e9f8; }

.lmap-popup-btn[class*="is-"] {
    background-color: var(--pb-tint);
    color: var(--pb);
}

.lmap-popup-btn[class*="is-"]:hover {
    background-color: var(--pb);
    color: #ffffff;
}
