/* Homepage feel map — every reviewed paddle on one power/control chart.
   Loaded only by the homepage. Continues the dark band that starts with
   .court-discovery, so it uses the same --green-950 base and white text.
   Generated markup: scripts/build_feelmap.py */

.feelmap-all {
  padding: 0 0 clamp(56px, 6vw, 88px);
  color: #fff;
  background: var(--green-950);
}

.feelmap-all__head {
  max-width: 780px;
  margin-bottom: clamp(20px, 2.6vw, 30px);
}

.feelmap-all__head h2 {
  margin: 0;
  font-size: clamp(1.9rem, 2.6vw, 2.7rem);
  font-weight: 700;
  line-height: 0.96;
  text-transform: uppercase;
}

.feelmap-all__head p {
  margin: 14px 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 1rem;
  line-height: 1.5;
}

.feelmap-all__chart {
  position: relative;
  height: clamp(380px, 42vw, 580px);
  border: 1px solid rgba(231, 241, 235, 0.18);
  border-radius: var(--radius);
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(9, 98, 58, 0.55), transparent 70%),
    var(--green-900);
}

.feelmap-all__axis {
  position: absolute;
  background: rgba(231, 241, 235, 0.16);
}

.feelmap-all__axis--v {
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
}

.feelmap-all__axis--h {
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
}

/* Above the paddles: a 38px sprite dot near the edge would otherwise cover the
   axis label, and the shadow keeps the text legible where one overlaps. */
.feelmap-all__end {
  position: absolute;
  z-index: 2;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9), 0 0 9px rgba(0, 44, 27, 0.95);
}

.feelmap-all__end--top {
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
}

.feelmap-all__end--bottom {
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
}

.feelmap-all__end--left {
  top: 50%;
  left: 14px;
  transform: translateY(-50%);
}

.feelmap-all__end--right {
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
}

/* Each dot is one cell of the paddle sprite. background-size scales the sheet
   so that exactly one cell fills the dot, and the inline background-position
   picks which cell. One request instead of 152, and no per-dot scaling. */
.feelmap-all__dot {
  position: absolute;
  left: var(--feel-x);
  top: var(--feel-y);
  width: 38px;
  height: 38px;
  margin: -19px 0 0 -19px;
  background-image: var(--feelmap-sprite);
  background-size: var(--feelmap-cols) var(--feelmap-rows);
  background-repeat: no-repeat;
  /* Thin light rim plus a dark shadow: the paddles are mostly black carbon,
     and on the dark green chart they would otherwise merge into each other
     wherever the cloud overlaps. */
  filter: drop-shadow(0 0 1px rgba(255, 255, 255, 0.45))
    drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6));
  transition: filter 0.12s var(--ease);
}

/* Hover lifts the paddle with light, not with scale: growing the dot would
   shuffle the cloud and hide the neighbours it overlaps. */
.feelmap-all__dot:hover,
.feelmap-all__dot:focus-visible {
  z-index: 3;
  filter: drop-shadow(0 0 9px rgba(255, 215, 53, 0.65)) brightness(1.22);
  outline: none;
}

/* Paddle without a photo: keep it on the map as a plain marker. */
.feelmap-all__dot--plain {
  width: 13px;
  height: 13px;
  margin: -6.5px 0 0 -6.5px;
  border: 1px solid rgba(0, 44, 27, 0.85);
  border-radius: 50%;
  background-image: none;
  background-color: var(--yellow);
  filter: none;
  transition: transform 0.12s var(--ease), background-color 0.12s var(--ease);
}

.feelmap-all__dot--plain:hover,
.feelmap-all__dot--plain:focus-visible {
  transform: scale(1.7);
  background-color: #fff;
  filter: none;
}

.feelmap-all__tip {
  position: absolute;
  left: 50%;
  top: calc(100% + 9px);
  display: none;
  min-width: 168px;
  max-width: 262px;
  padding: 8px 11px;
  transform: translateX(-50%);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 12px 26px rgba(0, 20, 12, 0.4);
  font-size: 0.78rem;
  line-height: 1.3;
  text-align: center;
  pointer-events: none;
}

.feelmap-all__dot--tip-above .feelmap-all__tip {
  top: auto;
  bottom: calc(100% + 9px);
}

/* Flush with the dot edge rather than overhanging it: a sprite dot is 38px
   wide, so a paddle near the border already sits against the chart edge and a
   negative offset would push the tooltip outside. */
.feelmap-all__dot--tip-left .feelmap-all__tip {
  left: 0;
  transform: none;
  text-align: left;
}

.feelmap-all__dot--tip-right .feelmap-all__tip {
  left: auto;
  right: 0;
  transform: none;
  text-align: right;
}

.feelmap-all__tip b {
  display: block;
  font-weight: 700;
}

.feelmap-all__tip i {
  display: block;
  margin-top: 2px;
  color: var(--green-700);
  font-style: normal;
  font-weight: 700;
}

.feelmap-all__tip em {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-style: normal;
  font-size: 0.72rem;
}

.feelmap-all__dot:hover .feelmap-all__tip,
.feelmap-all__dot:focus-visible .feelmap-all__tip {
  display: block;
}

.feelmap-all__foot {
  margin: 14px 0 0;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.84rem;
}

.feelmap-all__foot a {
  color: rgba(255, 255, 255, 0.84);
}

@media (max-width: 720px) {
  .feelmap-all__chart {
    height: clamp(330px, 88vw, 430px);
  }

  .feelmap-all__dot {
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
  }

  .feelmap-all__dot--plain {
    width: 11px;
    height: 11px;
    margin: -5.5px 0 0 -5.5px;
  }

  .feelmap-all__tip {
    min-width: 140px;
    font-size: 0.74rem;
  }
}

/* Touch devices have no hover: the dot still links to the review, and the
   tooltip opens on focus after a tap. Keep the hit area comfortable. */
@media (hover: none) {
  .feelmap-all__dot--plain {
    width: 15px;
    height: 15px;
    margin: -7.5px 0 0 -7.5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .feelmap-all__dot {
    transition: none;
  }
}
