/**
 * File: map-valuation.css
 * Purpose: Valuation mode swatch, legend, and selected-acre score panel.
 * Placement: Loaded by map.html after shared map and mode styles.
 * Dependencies: Layer-menu and project-details primitives from existing styles.
 * Public selectors: .layer-swatch-valuation, .valuation-legend and valuation detail classes.
 * Side effects: Shows the valuation tool legend independently of its basemap.
 */

.layer-swatch-valuation {
  background:
    linear-gradient(rgba(255, 255, 255, 0.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.16) 1px, transparent 1px),
    linear-gradient(135deg, #232066, #1985c4 25%, #16b4a6 36%, #40c569 48%, #f5c736 70%, #e13743 91%, #a1206d);
  background-size: 7px 7px, 7px 7px, 100% 100%;
}

.valuation-legend {
  display: none;
  margin-top: 0.42rem;
  padding: 0.7rem 0.58rem 0.55rem;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
}

body[data-map-tool="valuation"] .valuation-legend {
  display: block;
}

.valuation-legend-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
}

.valuation-legend-heading strong {
  font-size: 0.67rem;
}

.valuation-legend-heading span {
  padding: 0.13rem 0.34rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.48rem;
  letter-spacing: 0.04em;
}

.valuation-gradient {
  height: 0.42rem;
  margin-top: 0.64rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    #232066,
    #244b9a 15%,
    #1985c4 24%,
    #16b4a6 36%,
    #40c569 48%,
    #b1d337 60%,
    #f5c736 70%,
    #f68024 80%,
    #e13743 91%,
    #a1206d
  );
}

.valuation-gradient-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 0.28rem;
  color: rgba(255, 255, 255, 0.56);
  font-size: 0.49rem;
}

.valuation-legend-status,
.valuation-legend-note {
  display: block;
  margin-top: 0.58rem;
  color: rgba(255, 255, 255, 0.54);
  font-size: 0.5rem;
  line-height: 1.4;
}

.valuation-legend-status {
  color: rgba(255, 255, 255, 0.75);
}

.valuation-details {
  z-index: 7;
  color: #22342b;
}

.valuation-score-summary {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.35rem 0 0.95rem;
  border-bottom: 1px solid #dce5df;
}

.valuation-score-summary > strong {
  display: grid;
  min-width: 5.4rem;
  min-height: 3.15rem;
  padding: 0.42rem 0.7rem;
  place-items: center;
  border: 1px solid #abd8c2;
  border-radius: 0.8rem;
  color: #126943;
  font-size: 0.95rem;
  letter-spacing: -0.025em;
  line-height: 1;
  white-space: nowrap;
  background: #eff8f3;
  box-shadow: inset 0 0 0 4px rgba(34, 145, 91, 0.06);
}

.valuation-score-summary b,
.valuation-score-summary small {
  display: block;
}

.valuation-score-summary b {
  color: #22342b;
  font-size: 0.76rem;
}

.valuation-score-summary small {
  margin-top: 0.18rem;
  color: #6b7a72;
  font-size: 0.56rem;
}

.valuation-score-list {
  display: grid;
  gap: 0.72rem;
  margin: 0.9rem 0 0;
  padding: 0;
  list-style: none;
}

.valuation-details-heading {
  margin: 0.95rem 0 0.5rem;
  color: #1e3127;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.valuation-score-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.16rem 0.8rem;
  align-items: end;
}

.valuation-score-list span strong,
.valuation-score-list span small {
  display: block;
}

.valuation-score-list span strong {
  color: #263a30;
  font-size: 0.72rem;
}

.valuation-score-list span small {
  margin-top: 0.08rem;
  color: #69786f;
  font-size: 0.56rem;
}

.valuation-score-list output {
  color: #465a50;
  font-size: 0.56rem;
}

.valuation-score-list i {
  grid-column: 1 / -1;
  display: block;
  height: 0.28rem;
  overflow: hidden;
  border-radius: 999px;
  background: #e1e8e3;
}

.valuation-score-list i b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #244b9a, #16b4a6 34%, #b1d337 58%, #f68024 80%, #e13743);
}

.valuation-distance-list {
  display: grid;
  gap: 0.52rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.valuation-distance-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.14rem 0.75rem;
  padding: 0.52rem 0.6rem;
  border: 1px solid #dbe5de;
  border-radius: 0.58rem;
  background: #f4f7f5;
}

.valuation-distance-row span strong,
.valuation-distance-row span small,
.valuation-distance-row > b {
  display: block;
}

.valuation-distance-row span strong {
  color: #263a30;
  font-size: 0.68rem;
}

.valuation-distance-row span small {
  margin-top: 0.12rem;
  color: #68786f;
  font-size: 0.52rem;
  line-height: 1.35;
}

.valuation-distance-row output {
  color: #126943;
  font-size: 0.64rem;
  font-weight: 700;
  white-space: nowrap;
}

.valuation-distance-row > b {
  grid-column: 1 / -1;
  color: #52675b;
  font-size: 0.54rem;
  font-weight: 600;
}

.valuation-details-meta,
.valuation-details-note {
  color: #66776e;
  font-size: 0.52rem;
  line-height: 1.45;
}

.valuation-details-meta {
  margin: 0.95rem 0 0;
}

.valuation-details-note {
  margin: 0.58rem 0 0;
  padding-top: 0.62rem;
  border-top: 1px solid #dce5df;
}

@media (max-width: 680px) {
  .valuation-details {
    max-height: min(60vh, 31rem);
  }
}
