/* Golf Course Altitude & Uphill/Downhill Elevation Plays-Like Calculator */

.ae-preset-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.ae-preset-btn {
  appearance: none;
  min-height: 52px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--hairline-strong);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.25;
  text-align: left;
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease, transform 140ms cubic-bezier(0.22, 1, 0.36, 1);
}

.ae-preset-btn small {
  display: block;
  font-weight: 500;
  font-size: 10.5px;
  color: var(--muted);
  margin-top: 3px;
}

.ae-preset-btn:hover:not([aria-pressed="true"]) {
  border-color: var(--turf);
  transform: translateY(-1px);
}

.ae-preset-btn[aria-pressed="true"] {
  background: var(--pine);
  border-color: var(--pine);
  color: #f4f7f2;
}

.ae-preset-btn[aria-pressed="true"] small {
  color: rgba(244, 247, 242, 0.82);
}

html[data-theme="radar"] .ae-preset-btn {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(158, 192, 176, 0.3);
  color: #e6f2ec;
}

html[data-theme="radar"] .ae-preset-btn[aria-pressed="true"] {
  background: var(--optic-bright);
  border-color: var(--optic-bright);
  color: #081c14;
}

html[data-theme="radar"] .ae-preset-btn[aria-pressed="true"] small {
  color: rgba(8, 28, 20, 0.8);
}

.ae-shot-box {
  padding: 12px 14px;
  border-radius: 9px;
  background: var(--paper);
  border: 1px solid var(--hairline-strong);
  margin-bottom: 12px;
}

html[data-theme="radar"] .ae-shot-box {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(158, 192, 176, 0.25);
}

.ae-shot-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 4px 0 8px;
}

.ae-num-input {
  width: 96px;
  border: 0;
  border-bottom: 2px solid var(--ink);
  background: transparent;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 32px;
  font-weight: 800;
  line-height: 1.1;
  padding: 2px 0;
}

.ae-range {
  width: 100%;
  accent-color: var(--turf);
  cursor: pointer;
}

html[data-theme="radar"] .ae-range {
  accent-color: var(--optic-bright);
}

.ae-sliders-stack {
  display: grid;
  gap: 10px;
  margin: 12px 0;
}

.ae-slider-card {
  padding: 11px 13px;
  border-radius: 8px;
  background: var(--paper);
  border: 1px solid var(--hairline-strong);
}

html[data-theme="radar"] .ae-slider-card {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(158, 192, 176, 0.25);
}

.ae-slider-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink);
}

.ae-slider-val {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 800;
  color: var(--turf);
}

html[data-theme="radar"] .ae-slider-val {
  color: var(--optic-bright);
}

#ae-reset {
  appearance: none;
  min-height: 44px;
  padding: 0 13px;
  border-radius: 7px;
  border: 1px solid var(--hairline-strong);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
}

html[data-theme="radar"] #ae-reset {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(158, 192, 176, 0.38);
  color: #e6f2ec;
}

/* Mountain Cross-Section Terrain & Ball-Flight Radar */
.ae-radar-box {
  margin: 14px 0 16px;
  padding: 14px 16px 12px;
  border-radius: 10px;
  background: linear-gradient(180deg, #0b241b 0%, #071912 100%);
  border: 1px solid #1f4d3b;
  color: #e6f2ec;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 8px 20px rgba(7, 25, 18, 0.14);
}

.ae-radar-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 6px 12px;
  margin-bottom: 6px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #9ec0b0;
}

.ae-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-bottom: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10.5px;
}

.ae-leg-flat { color: #9ec0b0; font-weight: 700; }
.ae-leg-adj { color: #6ee7b7; font-weight: 700; }

.ae-terrain-svg {
  display: block;
  width: 100%;
  height: auto;
}

@keyframes aeTraceFlight {
  0% { stroke-dashoffset: 100; }
  100% { stroke-dashoffset: 0; }
}

@keyframes aeFlagPulse {
  0% { r: 3.5; opacity: 0.9; }
  100% { r: 12; opacity: 0; }
}

.ae-terrain-fill {
  fill: rgba(16, 185, 129, 0.16);
  stroke: rgba(110, 231, 183, 0.48);
  stroke-width: 1.6;
}

.ae-sea-line {
  stroke: rgba(158, 192, 176, 0.35);
  stroke-width: 1.2;
  stroke-dasharray: 4 3;
}

.ae-arc-base {
  fill: none;
  stroke: rgba(158, 192, 176, 0.62);
  stroke-width: 2;
  stroke-dasharray: 5 4;
}

.ae-arc-live {
  fill: none;
  stroke: #6ee7b7;
  stroke-width: 2.8;
  stroke-dasharray: 100;
  stroke-dashoffset: 0;
  animation: aeTraceFlight 560ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.ae-arc-uphill {
  fill: none;
  stroke: #fcd34d;
  stroke-width: 2.8;
  stroke-dasharray: 100;
  stroke-dashoffset: 0;
  animation: aeTraceFlight 560ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.ae-pin-pole { stroke: #f8fafc; stroke-width: 1.8; }
.ae-pin-flag { fill: #fbbf24; }
.ae-dot-land { fill: #6ee7b7; }
.ae-ripple {
  fill: none;
  stroke: #6ee7b7;
  stroke-width: 1.5;
  animation: aeFlagPulse 1.7s ease-out infinite;
}

.ae-svg-label {
  fill: #9ec0b0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 9.5px;
}

.ae-svg-pill-bg {
  fill: rgba(8, 28, 20, 0.88);
  stroke: rgba(110, 231, 183, 0.42);
  stroke-width: 1;
}

.ae-svg-pill-txt {
  fill: #e6f2ec;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 9.5px;
  font-weight: 700;
}

.ae-status-pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.ae-status-pill.shorter {
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid rgba(16, 185, 129, 0.38);
  color: var(--turf);
}

html[data-theme="radar"] .ae-status-pill.shorter {
  color: #6ee7b7;
}

.ae-status-pill.longer {
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid rgba(245, 158, 11, 0.45);
  color: #92400e;
}

html[data-theme="radar"] .ae-status-pill.longer {
  color: #fcd34d;
}

.ae-readout-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.ae-metric-card {
  padding: 12px;
  border-radius: 9px;
  background: var(--paper);
  border: 1px solid var(--hairline-strong);
  min-width: 0;
}

.ae-metric-card.is-primary {
  border-width: 1.5px;
  border-color: var(--turf);
}

html[data-theme="radar"] .ae-metric-card {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(158, 192, 176, 0.25);
}

html[data-theme="radar"] .ae-metric-card.is-primary {
  border-color: var(--optic-bright);
}

.ae-metric-kicker {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}

.ae-metric-val {
  display: block;
  font-family: var(--sans);
  font-size: clamp(18px, 1.9vw, 22px);
  font-weight: 800;
  line-height: 1.15;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.ae-metric-sub {
  display: block;
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 4px;
}

.ae-copy-btn {
  appearance: none;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid var(--hairline-strong);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

html[data-theme="radar"] .ae-copy-btn {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(158, 192, 176, 0.4);
  color: #e6f2ec;
}

@media (prefers-reduced-motion: reduce) {
  .ae-arc-live,
  .ae-arc-uphill,
  .ae-ripple {
    animation: none !important;
  }

  .ae-preset-btn {
    transition: none !important;
  }
}

@media (max-width: 720px) {
  .ae-preset-grid,
  .ae-readout-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
