/* Progressive Golf Shaft Weight Calculator (Driver, Fairways, Hybrids, Irons & Wedges) */

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

.sw-seg-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin: 6px 0 13px;
}

.sw-preset-btn,
.sw-seg-btn {
  appearance: none;
  min-height: 48px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--hairline-strong);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 12px;
  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);
}

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

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

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

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

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

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

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

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

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

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

.sw-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;
}

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

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

#sw-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"] #sw-reset {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(158, 192, 176, 0.38);
  color: #e6f2ec;
}

/* Escalator & Dispersion Radar */
.sw-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);
}

.sw-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;
}

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

.sw-leg-whip { color: #9ec0b0; font-weight: 700; }
.sw-leg-match { color: #6ee7b7; font-weight: 700; }

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

@keyframes swBarRise {
  0% { opacity: 0.35; transform: scaleY(0.85); }
  100% { opacity: 1; transform: scaleY(1); }
}

@keyframes swConePulse {
  0%, 100% { fill-opacity: 0.18; }
  50% { fill-opacity: 0.3; }
}

.sw-divider {
  stroke: rgba(158, 192, 176, 0.25);
  stroke-width: 1;
  stroke-dasharray: 3 3;
}

.sw-bar-rect {
  fill: rgba(110, 231, 183, 0.25);
  stroke: #6ee7b7;
  stroke-width: 1.5;
  transform-box: fill-box;
  transform-origin: bottom;
  animation: swBarRise 320ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.sw-bar-val {
  fill: #e6f2ec;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 9.5px;
  font-weight: 700;
}

.sw-center-line {
  stroke: rgba(158, 192, 176, 0.35);
  stroke-width: 1;
  stroke-dasharray: 4 3;
}

.sw-cone-whip {
  fill: rgba(248, 113, 113, 0.08);
  stroke: rgba(252, 165, 165, 0.55);
  stroke-width: 1.5;
  stroke-dasharray: 5 4;
}

.sw-cone-match {
  fill: #34d399;
  fill-opacity: 0.22;
  stroke: #6ee7b7;
  stroke-width: 2;
  animation: swConePulse 2.2s ease-in-out infinite;
}

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

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

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

.sw-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;
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid rgba(16, 185, 129, 0.38);
  color: var(--turf);
}

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

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

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

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

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

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

.sw-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;
}

.sw-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;
}

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

.sw-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"] .sw-copy-btn {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(158, 192, 176, 0.4);
  color: #e6f2ec;
}

@media (prefers-reduced-motion: reduce) {
  .sw-bar-rect,
  .sw-cone-match {
    animation: none !important;
  }

  .sw-preset-btn,
  .sw-seg-btn {
    transition: none !important;
  }
}

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