/* ============================================================
   Service Areas — search panel + Leaflet map
   Shortcode: [premiumhomes_service_areas]
   ============================================================ */

.ph-service-areas {
    padding: 64px 24px;
    background: #FAFAF7;
    /* Full-bleed background regardless of parent content width. */
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    width: auto;
}

/* Top/bottom padding is set inline by the shortcode (Site Settings →
   Service Areas). Absorb toggles pull the section up/down so it butts
   against the previous / next section instead of leaving the parent
   container's padding visible as a white strip. The transform values
   match the default Kadence row vertical padding; bump them if your
   page's surrounding gap is larger. */
.ph-service-areas--absorb-top {
    margin-top: -56px;
}
.ph-service-areas--absorb-bottom {
    margin-bottom: -56px;
}

@media (min-width: 768px) {
    .ph-service-areas--absorb-top    { margin-top: -80px; }
    .ph-service-areas--absorb-bottom { margin-bottom: -80px; }
}

.ph-service-areas__inner {
    max-width: 1200px;
    margin: 0 auto;
}

.ph-service-areas__header {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 36px;
}

.ph-service-areas__heading {
    margin: 0 0 12px;
    font-size: clamp(26px, 3vw, 36px);
    font-weight: 600;
    color: #1F2937;
    line-height: 1.2;
}

.ph-service-areas__intro {
    margin: 0;
    color: #4B5563;
    font-size: 16px;
    line-height: 1.6;
}

/* Two-column layout: panel + map */
.ph-service-areas__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    align-items: stretch;
}

@media (min-width: 900px) {
    .ph-service-areas__grid {
        grid-template-columns: minmax(320px, 5fr) 7fr;
        gap: 32px;
    }
}

/* ----- Left panel ----- */
.ph-service-areas__panel {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 24px;
    display: flex;
    flex-direction: column;
}

.ph-service-areas__label {
    font-size: 13px;
    font-weight: 600;
    color: #4B5563;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 0 0 10px;
}

/* Flexbox search bar — wrapper IS the visual input.
   This avoids any chance of icon/text overlap from
   theme styles overriding our padding. */
.ph-service-areas__search {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    transition: border-color 150ms ease, box-shadow 150ms ease, background-color 150ms ease;
    margin-bottom: 14px;
}

.ph-service-areas__search:focus-within {
    background: #FFFFFF;
    border-color: #C4853A;
    box-shadow: 0 0 0 3px rgba(196, 133, 58, 0.15);
}

.ph-service-areas__search-icon {
    flex: 0 0 18px;
    color: #9CA3AF;
    pointer-events: none;
}

.ph-service-areas__search:focus-within .ph-service-areas__search-icon {
    color: #C4853A;
}

.ph-service-areas .ph-service-areas__input {
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
    margin: 0;
    padding: 14px 0;
    font-size: 16px;
    color: #1F2937;
    background: transparent;
    border: 0;
    border-radius: 0;
    outline: none;
    box-shadow: none;
    -webkit-appearance: none;
    appearance: none;
}

.ph-service-areas .ph-service-areas__input:focus {
    outline: none;
    box-shadow: none;
}

/* Result message */
.ph-service-areas__result {
    font-size: 14px;
    line-height: 1.6;
    color: #1F2937;
    transition: padding 150ms ease, background-color 150ms ease;
    border-radius: 8px;
}

.ph-service-areas__result.is-match,
.ph-service-areas__result.is-nomatch {
    padding: 12px 14px;
    margin-bottom: 14px;
}

.ph-service-areas__result.is-match {
    background: rgba(196, 133, 58, 0.10);
    border: 1px solid rgba(196, 133, 58, 0.30);
}

.ph-service-areas__result.is-nomatch {
    background: #FEF2F2;
    border: 1px solid #FECACA;
    color: #7F1D1D;
}

.ph-service-areas__result a {
    color: #C4853A;
    text-decoration: underline;
    font-weight: 600;
}

.ph-service-areas__result.is-nomatch a {
    color: #B91C1C;
}

/* Chips */
.ph-service-areas__chips-label {
    margin: 8px 0 10px;
    font-size: 13px;
    color: #6B7280;
    font-weight: 500;
}

.ph-service-areas__chips {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ph-service-areas__chip {
    appearance: none;
    border: 1px solid #E5E7EB;
    background: #FFFFFF;
    color: #374151;
    font-size: 13px;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 999px;
    cursor: pointer;
    transition: background-color 120ms ease, color 120ms ease, border-color 120ms ease;
}

.ph-service-areas__chip:hover,
.ph-service-areas__chip:focus-visible {
    background: #C4853A;
    border-color: #C4853A;
    color: #FFFFFF;
    outline: none;
}

/* ----- Map ----- */
.ph-service-areas__map {
    min-height: 380px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #E5E7EB;
    background: #F3F4F6;
    position: relative;
}

@media (min-width: 900px) {
    .ph-service-areas__map {
        min-height: 100%;
    }
}

.ph-service-areas__map iframe,
.ph-service-areas__map-canvas {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 380px;
    border: 0;
}

/* Leaflet popup brand polish */
.ph-service-areas .leaflet-popup-content-wrapper {
    border-radius: 8px;
}

.ph-service-areas .leaflet-popup-content {
    margin: 12px 14px;
    font-size: 14px;
    line-height: 1.5;
    color: #1F2937;
}

.ph-service-areas .leaflet-popup-content a {
    color: #C4853A;
    text-decoration: underline;
    font-weight: 600;
}
