p{
    margin: 0;
    padding: 0;
}
.field-location-page {
    max-width: 1200px;
    margin: 0 auto;
}


/* =========================
   PAGE HEADER
========================= */

.field-location-header {
    padding: 55px 20px 35px;
    text-align: center;
}

.field-location-header h1 {
    margin: 0 0 12px;
    font-size: 36px;
    font-weight: 700;
}

.field-location-header p {
    max-width: 750px;
    margin: 0 auto;
    color: #666;
    font-size: 16px;
    line-height: 1.7;
}


/* =========================
   MAP + LIST CONTAINER
========================= */

.field-location-container {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 420px;
    gap: 25px;
    max-width: 1400px;
    margin: 0 auto 50px;
    padding: 0 30px;
}


/* =========================
   MAP
========================= */

.field-location-map {
    width: 100%;
    height: 600px;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.12);
}

#leaflet-map {
    width: 100%;
    height: 100%;
}


/* =========================
   LOCATION LIST
========================= */

.field-location-list {
    display: flex;
    flex-direction: column;
    height: 600px;
    border: 1px solid #e5e5e5;
    border-radius: 14px;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.06);
}

.location-list-header {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.location-list-header h2 {
    margin: 0;
    font-size: 21px;
    font-weight: 600;
}

.location-list-header span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 30px;
    padding: 0 8px;
    border-radius: 15px;
    background: #eaf3e6;
    color: #2f6b2f;
    font-size: 13px;
    font-weight: 600;
}

/* flex child: scrolls at any container height (fixed or auto + max-height) */
.location-list-items {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #c9d6c4 transparent;
}

.location-list-items::-webkit-scrollbar {
    width: 6px;
}

.location-list-items::-webkit-scrollbar-thumb {
    background: #c9d6c4;
    border-radius: 3px;
}

.location-list-item {
    display: flex;
    gap: 13px;
    padding: 18px 20px;
    border-bottom: 1px solid #eee;
    border-left: 4px solid transparent;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.location-list-item:hover {
    background: #f8faf7;
}

.location-list-item.active {
    background: #f1f7ee;
    border-left-color: #2f6b2f;
}

.location-marker-icon {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f1f1f1;
    font-size: 16px;
    transition: background 0.2s ease;
}

.location-list-item.active .location-marker-icon {
    background: #d6e8cf;
}

.location-list-content {
    min-width: 0;
    flex: 1;
}

.location-list-content h3 {
    margin: 0 0 6px;
    font-size: 16px;
    line-height: 1.35;
    font-weight: 600;
}

.location-list-address {
    margin: 0 0 8px;
    color: #777;
    font-size: 12px;
    line-height: 1.5;
}

.location-list-description {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    margin: 0 0 10px;
    overflow: hidden;
    color: #555;
    font-size: 13px;
    line-height: 1.55;
}

.location-list-link {
    display: inline-block;
    font-size: 13px;
    font-weight: 500;
    color: #2f6b2f;
    text-decoration: none;
}

.location-list-link:hover {
    text-decoration: underline;
}

.location-empty {
    padding: 40px 20px;
    text-align: center;
    color: #777;
}


/* =========================
   CROP CALENDAR (inside map popup)
========================= */

.popup-calendar {
    margin-bottom: 10px;
}

.popup-calendar-title {
    margin-bottom: 6px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #6a7d65;
}

.popup-calendar-grid {
    display: flex;
    border-radius: 6px;
    overflow: hidden;
}

.cal-chip {
    flex: 1 1 0;
    min-width: 0;
    padding: 5px 0;
    border-left: 1px solid rgba(255, 255, 255, 0.6);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-align: center;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.3);
    cursor: default;
}

.cal-chip:first-child {
    border-left: 0;
}

.popup-calendar-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
    margin-top: 7px;
}

.legend-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #58665b;
    font-size: 10.5px;
    font-weight: 600;
}

.legend-color {
    width: 9px;
    height: 9px;
    border-radius: 3px;
}


/* =========================
   LEAFLET POPUP SHELL
========================= */

.field-popup .leaflet-popup-content-wrapper {
    padding: 0;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.22);
}

.field-popup .leaflet-popup-content {
    margin: 0;
    width: 100% !important;
}

.field-popup .leaflet-popup-close-button {
    top: 8px;
    right: 8px;
    width: 26px;
    height: 26px;
    padding: 0;
    line-height: 24px;
    text-align: center;
    border-radius: 50%;
    color: #fff;
    font-size: 20px;
    background: rgba(255, 255, 255, 0.18);
    transition: background 0.2s ease;
}

.field-popup .leaflet-popup-close-button:hover {
    background: rgba(255, 255, 255, 0.35);
    color: #fff;
}


/* =========================
   POPUP CARD
========================= */

.map-popup-card {
    font-size: 13px;
    color: #222;
}

.map-popup-head {
    padding: 14px 40px 12px 16px;
    background: linear-gradient(135deg, #2f6b2f, #4c9a4c);
    color: #fff;
}

.map-popup-title {
    margin: 0;
    color: wheat;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.35;
}

.map-popup-address {
    /* margin: 4px 0 0; */
    font-size: 12px;
    line-height: 1.45;
    opacity: 0.9;
}

.map-popup-body {
    max-height: var(--popup-body-max, 300px);
    padding: 12px 14px 14px;
    overflow-y: auto;
    scrollbar-width: thin;
}

.map-popup-description {
    /* margin: 0 0 10px; */
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: #555;
}

.map-popup-link {
    display: inline-block;
    margin-top: 10px;
    padding: 7px 14px;
    border-radius: 20px;
    background: #2f6b2f;
    color: #fff !important;
    font-size: 12.5px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s ease;
}

.map-popup-link:hover {
    background: #245524;
}


/* =========================
   WEATHER PANEL
========================= */

.weather-panel {
    padding: 12px;
    border-radius: 10px;
    background: #f1f7ee;
    border: 1px solid #dfeadb;
}

.weather-now {
    display: flex;
    align-items: center;
    gap: 10px;
}

.weather-now-icon {
    font-size: 36px;
    line-height: 1;
}

.weather-now-main {
    flex: 1;
    min-width: 0;
}

.weather-temp {
    font-size: 26px;
    font-weight: 700;
    line-height: 1.1;
}

.weather-desc {
    margin-top: 2px;
    font-size: 12px;
    color: #555;
}

.weather-chips {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: flex-end;
}

.chip {
    padding: 2px 8px;
    border-radius: 12px;
    background: #fff;
    font-size: 11.5px;
    white-space: nowrap;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.forecast-title {
    margin: 12px 0 6px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #6a7d65;
}

.forecast-strip {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 5px;
}

.forecast-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 7px 2px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid transparent;
    text-align: center;
}

.forecast-col.is-today {
    border-color: #2f6b2f;
    background: #e8f3e4;
}

.forecast-day  { font-size: 11.5px; font-weight: 600; }
.forecast-date { font-size: 9.5px; color: #888; }

.forecast-icon {
    margin: 4px 0 2px;
    font-size: 20px;
    line-height: 1.2;
}

.forecast-max { font-size: 13px; font-weight: 700; }
.forecast-min { font-size: 11.5px; color: #888; }

.forecast-rain {
    margin-top: 3px;
    font-size: 10px;
    color: #2b6cb0;
}

.weather-credit {
    margin-top: 8px;
    text-align: right;
    font-size: 10px;
    color: #8a9a85;
}

.weather-credit a {
    color: inherit;
}

/* Error state */

.weather-error {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: #fdf1f0;
    border-color: #f3d2cf;
    color: #a33a32;
    font-size: 12.5px;
}

.weather-retry {
    padding: 4px 12px;
    border: 1px solid #a33a32;
    border-radius: 14px;
    background: transparent;
    color: #a33a32;
    font-size: 12px;
    cursor: pointer;
}

.weather-retry:hover {
    background: #a33a32;
    color: #fff;
}

/* Loading skeleton */

.sk {
    border-radius: 6px;
    background: linear-gradient(90deg, #e3ecdf 25%, #f2f7ef 50%, #e3ecdf 75%);
    background-size: 200% 100%;
    animation: weather-shimmer 1.2s infinite;
}

.sk-big   { width: 55%;  height: 34px; }
.sk-line  { width: 35%;  height: 12px; margin-top: 8px; }
.sk-strip { width: 100%; height: 86px; margin-top: 14px; }

@keyframes weather-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}


/* =========================
   TABLET
========================= */

@media (max-width: 1000px) {

    .field-location-container {
        grid-template-columns: 1fr;
        padding: 0 20px;
    }

    .field-location-map {
        height: 500px;
    }

    .field-location-list {
        height: auto;
        max-height: 500px;
    }
}


/* =========================
   MOBILE
========================= */

@media (max-width: 600px) {

    .field-location-header {
        padding: 40px 20px 25px;
    }

    .field-location-header h1 {
        font-size: 28px;
    }

    .field-location-header p {
        font-size: 14px;
    }

    .field-location-container {
        padding: 0 15px;
        gap: 15px;
    }

    .field-location-map {
        height: 400px;
        border-radius: 10px;
    }

    .field-location-list {
        max-height: 450px;
        border-radius: 10px;
    }

    .location-list-item {
        padding: 14px 16px;
    }

    .location-list-content h3 {
        font-size: 15px;
    }

    .location-list-description {
        font-size: 12px;
    }

    .weather-chips,
    .forecast-date {
        display: none;      /* keep popup compact on small screens */
    }
}