/* === Map Panel ===
   Collapsible <details> card shown below the viewer in map-split mode.
   Contains parcel heading, NDVI load controls, meta chips, chart, and scene list. */
.map-parcel-details-wrap[hidden] {
    display: none;
}

.map-parcel-details {
    position: relative;
    border: 1px solid rgba(55, 146, 55, 0.14);
    border-radius: 22px;
    background: rgba(237, 251, 226, 0.92);
    box-shadow: 0 20px 48px rgba(15, 23, 42, 0.1);
    overflow: clip;
    display: flex;
    flex-direction: column;
}

.map-parcel-details-summary {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 292px 16px 18px;
}

.map-parcel-details-heading {
    flex: 1;
    min-width: 0;
}

.map-parcel-details-actions {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 8px;
}

.map-download-boundary-kml-btn {
    min-height: 0;
    width: 138px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1.15;
    text-align: center;
    white-space: normal;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.08);
}

.map-download-boundary-kml-btn:disabled {
    box-shadow: none;
}

.map-focus-selection-link {
    min-height: 0;
    width: 110px;
    padding: 7px 10px;
    border: 1px solid rgba(55, 146, 55, 0.22);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    color: rgba(21, 101, 52, 0.92);
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1.1;
    text-align: center;
    white-space: nowrap;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
    cursor: pointer;
    transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease, transform 140ms ease;
}

.map-focus-selection-link:hover,
.map-focus-selection-link:focus-visible {
    background: rgba(255, 255, 255, 0.92);
    border-color: rgba(55, 146, 55, 0.34);
    color: rgba(15, 76, 39, 0.98);
    transform: translateY(-1px);
}

.map-focus-selection-link:disabled {
    color: rgba(46, 81, 89, 0.45);
    border-color: rgba(46, 81, 89, 0.12);
    background: rgba(255, 255, 255, 0.5);
    box-shadow: none;
    cursor: default;
    transform: none;
}

.map-parcel-details-eyebrow {
    margin: 0 0 4px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(46, 81, 89, 0.74);
}

.map-parcel-details-title {
    margin: 0;
    font-size: 1rem;
    line-height: 1.2;
    color: var(--text-main);
    overflow-wrap: anywhere;
}

.map-parcel-details-subtitle {
    margin: 8px 0 0;
    max-width: 52ch;
    font-size: 0.82rem;
    line-height: 1.5;
    color: rgba(47, 59, 64, 0.8);
}

.map-parcel-details-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 14px 18px 18px;
    border-top: 1px solid rgba(55, 146, 55, 0.12);
    max-height: 600px;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(55, 146, 55, 0.35) transparent;
}

.map-parcel-details-copy,
.map-ndvi-status,
.map-ndvi-filters,
.map-ndvi-empty {
    margin: 0;
    font-size: 0.82rem;
    line-height: 1.5;
}

.map-parcel-details-copy,
.map-ndvi-filters,
.map-ndvi-empty {
    color: rgba(47, 59, 64, 0.82);
}

.map-ndvi-status {
    color: var(--text-main);
    font-weight: 600;
}

.group-builder-panel--embedded {
    display: block;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.group-builder-panel--embedded > .group-builder-summary {
    display: none;
}

.group-builder-panel--embedded > .group-builder-body {
    padding: 0;
    gap: 10px;
}

.sidebar-analysis-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.analysis-action-button {
    background: linear-gradient(135deg, #3b9b2f 0%, #23761d 100%);
    color: #fff;
    border-color: rgba(14, 92, 23, 0.35);
    box-shadow: 0 12px 24px rgba(35, 118, 29, 0.2);
}

.analysis-action-button:hover:not(:disabled),
.analysis-action-button:focus-visible:not(:disabled) {
    background: linear-gradient(135deg, #45ac36 0%, #2a841f 100%);
    border-color: rgba(14, 92, 23, 0.45);
    box-shadow: 0 16px 28px rgba(35, 118, 29, 0.24);
    transform: translateY(-1px);
}

.analysis-placeholder-button {
    position: relative;
    min-height: 0;
    padding: 10px 12px 24px;
    text-align: left;
    font-size: 0.82rem;
    line-height: 1.25;
    border-radius: 14px;
    transition: background-color 140ms ease, border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease, opacity 140ms ease;
}

.sidebar-analysis-button {
    width: 100%;
    justify-content: flex-start;
    align-items: flex-start;
    min-height: 56px;
    white-space: normal;
}

.sidebar-analysis-list .analysis-action-button {
    grid-column: 1 / -1;
    min-height: 46px;
    align-items: center;
    padding-bottom: 10px;
}

.sidebar-analysis-list .analysis-placeholder-button {
    padding: 10px 12px 24px;
    font-size: 0.79rem;
    line-height: 1.22;
}

.sidebar-analysis-list .analysis-soon-badge {
    right: 10px;
}

.analysis-placeholder-button:not(:disabled) {
    opacity: 1;
}

.analysis-placeholder-button:not(:disabled):hover,
.analysis-placeholder-button:not(:disabled):focus-visible {
    border-color: rgba(55, 146, 55, 0.3);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
    transform: translateY(-1px);
}

.analysis-soon-badge {
    position: absolute;
    bottom: 6px;
    right: 8px;
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(88, 96, 101, 0.86);
    background: rgba(88, 96, 101, 0.1);
    border-radius: 999px;
    padding: 3px 7px;
}

.map-ndvi-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.map-ndvi-meta[hidden] {
    display: none;
}

.map-ndvi-chip {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    padding: 7px 10px;
    border-radius: var(--border-pill);
    background: rgba(255, 255, 255, 0.66);
    border: 1px solid rgba(55, 146, 55, 0.12);
    color: var(--text-main);
    font-size: 0.78rem;
}

.map-ndvi-chip strong {
    color: var(--accent-strong);
}

.map-ndvi-chart {
    border: 1px solid rgba(55, 146, 55, 0.12);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.72);
    padding: 10px 12px 6px;
    overflow-x: auto;
    flex: 0 0 auto;
}

.map-ndvi-chart[hidden] {
    display: none;
}

.map-ndvi-chart .js-plotly-plot,
.map-ndvi-chart .plot-container,
.map-ndvi-chart .svg-container {
    width: 100%;
    min-width: 480px;
}

.map-ndvi-chart .modebar svg {
    display: block;
    width: 1em;
    min-width: 0;
    height: 1em;
}

.map-ndvi-scenes {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 0 18px 18px;
    padding: 14px;
    border: 1px solid rgba(55, 146, 55, 0.12);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.72);
    flex: 0 0 auto;
}

.map-ndvi-scenes[hidden] {
    display: none;
}

.map-ndvi-scenes-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.map-ndvi-scenes-eyebrow {
    margin: 0 0 4px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(47, 59, 64, 0.66);
}

.map-ndvi-scenes-title {
    margin: 0;
    font-size: 0.96rem;
    line-height: 1.3;
    color: var(--text-main);
}

.map-ndvi-scenes-progress {
    display: inline-flex;
    align-items: center;
    padding: 7px 10px;
    border-radius: var(--border-pill);
    background: rgba(237, 251, 226, 0.96);
    border: 1px solid rgba(55, 146, 55, 0.16);
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--accent-strong);
    white-space: nowrap;
}

.map-ndvi-range-group,
.map-ndvi-scene-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.map-ndvi-range-button,
.map-ndvi-scene-mode-button,
.map-ndvi-scene-chip,
.map-ndvi-scene-close-button {
    border: 1px solid rgba(46, 81, 89, 0.14);
    border-radius: var(--border-pill);
    background: rgba(255, 255, 255, 0.82);
    color: var(--text-main);
    font: inherit;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.2;
    padding: 8px 12px;
    cursor: pointer;
    transition: background 120ms ease, color 120ms ease, border-color 120ms ease, transform 120ms ease;
}

.map-ndvi-range-button:hover,
.map-ndvi-scene-mode-button:hover,
.map-ndvi-scene-chip:hover,
.map-ndvi-scene-close-button:hover {
    transform: translateY(-1px);
}

.map-ndvi-range-button.is-active,
.map-ndvi-scene-mode-button.is-active,
.map-ndvi-scene-chip.is-active {
    background: var(--accent-strong);
    border-color: var(--accent-strong);
    color: #fff;
}

.map-ndvi-download-button {
    max-width: 280px;
}

.map-ndvi-scene-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-height: 130px;
    overflow-y: auto;
    padding-right: 2px;
}

.map-ndvi-scenes-copy {
    margin: 0;
    font-size: 0.82rem;
    line-height: 1.5;
    color: rgba(47, 59, 64, 0.82);
}

.map-ndvi-scene-close-button {
    color: #8b2d2d;
}

.map-ndvi-grid {
    stroke: rgba(46, 81, 89, 0.12);
    stroke-width: 1;
}

.map-ndvi-axis {
    stroke: rgba(46, 81, 89, 0.28);
    stroke-width: 1.5;
}

.map-ndvi-axis-label {
    fill: rgba(47, 59, 64, 0.76);
    font-size: 12px;
    font-family: inherit;
}

.map-ndvi-line {
    fill: none;
    stroke: #379237;
    stroke-width: 3;
    stroke-linejoin: round;
    stroke-linecap: round;
}

.map-ndvi-point {
    fill: #f5c542;
    stroke: #2e5159;
    stroke-width: 1.5;
}

.map-ndvi-point--available {
    fill: #37ab37;
    stroke: #1e6e1e;
    stroke-width: 1.5;
    cursor: pointer;
}

.map-ndvi-point--available:hover {
    fill: #4dd14d;
    stroke-width: 2.5;
}

.locked-parcel-name {
    font-weight: 700;
    color: var(--accent-strong);
    font-size: 0.88rem;
}
