/* Field NDVI Viewer */

.ndvi-hero {
    background: linear-gradient(160deg, #1c261f 0%, #2f4a3a 100%);
    color: #f2ede4;
    padding: 4.5rem 0 2.5rem;
}

.ndvi-hero h1 { color: #fff; }
.ndvi-hero p { max-width: 46rem; }
.ndvi-hero a { color: #cfe3c2; }

.ndvi-back {
    display: inline-block;
    margin-bottom: 1rem;
    color: #cfe3c2;
    text-decoration: none;
    font-size: 0.9rem;
}

.ndvi-location {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.25rem;
}

.ndvi-location h2 { font-size: 1.1rem; margin: 0 0 1rem; }

.ndvi-location-inputs {
    display: flex;
    align-items: flex-end;
    gap: 1rem;
    flex-wrap: wrap;
}

.ndvi-input-group label {
    display: block;
    font-size: 0.85rem;
    margin-bottom: 0.35rem;
    font-weight: 600;
}

.ndvi-input-row { display: flex; gap: 0.5rem; }

.ndvi-input-row input {
    padding: 0.55rem 0.8rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1rem;
    width: 11rem;
}

.ndvi-input-divider { color: #888; padding-bottom: 0.65rem; }

.ndvi-status { margin-top: 0.75rem; font-size: 0.9rem; color: #2f5233; min-height: 1.2em; }
.ndvi-status.is-error { color: #a33; }

.ndvi-map-wrap {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1.25rem;
}

#ndviMap {
    height: 520px;
    border-radius: 8px;
    z-index: 0;
}

.ndvi-map-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 0.9rem;
    flex-wrap: wrap;
}

.ndvi-zoom-hint { font-size: 0.85rem; color: #777; }

.ndvi-panel {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.25rem;
}

.ndvi-panel-row {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
    margin-bottom: 0.9rem;
}

.ndvi-meta-item { margin-right: 1rem; font-size: 0.95rem; }

.ndvi-dates label { font-size: 0.9rem; margin-right: 0.4rem; }

.ndvi-dates select {
    padding: 0.4rem 0.6rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 0.95rem;
}

.ndvi-legend {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
    font-size: 0.85rem;
    color: #444;
}

.ndvi-legend-title { font-weight: 600; margin-right: 0.25rem; }

.ndvi-swatch {
    display: inline-block;
    width: 16px;
    height: 16px;
    border-radius: 4px;
    margin-left: 0.6rem;
    vertical-align: -3px;
}

.ndvi-note { font-size: 0.85rem; color: #666; margin: 0.8rem 0 0; }

@media (max-width: 768px) {
    #ndviMap { height: 380px; }
    .ndvi-panel-row { gap: 0.75rem; }
}

/* Layer toggle buttons */
.ndvi-layer-btns {
    display: inline-flex;
    border: 1px solid #ccc;
    border-radius: 10px;
    overflow: hidden;
}

.ndvi-layer-btn {
    padding: 0.5rem 0.9rem;
    background: #fff;
    border: none;
    border-right: 1px solid #ccc;
    font-size: 0.9rem;
    cursor: pointer;
    color: #333;
}

.ndvi-layer-btn:last-child { border-right: none; }

.ndvi-layer-btn.is-active {
    background: #2f5233;
    color: #fff;
}

.ndvi-layer-btn:hover:not(.is-active) { background: #f0efe9; }

/* Saved fields panel */
.ndvi-fields-box {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.25rem;
}

.ndvi-fields-box h3 { margin: 0 0 0.8rem; font-size: 1.05rem; }
.ndvi-fields-box p { margin: 0; font-size: 0.95rem; }

.ndvi-save-row { display: flex; gap: 0.6rem; flex-wrap: wrap; }

.ndvi-save-row input {
    padding: 0.5rem 0.8rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 0.95rem;
    flex: 1 1 14rem;
    max-width: 20rem;
}

.ndvi-field-list { list-style: none; margin: 1rem 0 0; padding: 0; }

.ndvi-field-list li {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem 0;
    border-top: 1px solid #f0f0ec;
    flex-wrap: wrap;
}

.ndvi-field-name {
    background: none;
    border: none;
    color: #14432E;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
}

.ndvi-field-alert { font-size: 0.85rem; color: #555; display: inline-flex; align-items: center; gap: 0.35rem; }

.ndvi-field-del {
    margin-left: auto;
    background: none;
    border: none;
    color: #a33;
    font-size: 1.2rem;
    cursor: pointer;
    line-height: 1;
    padding: 0 0.3rem;
}
