/* ============================================================
   styles.css — Dumbbell
   Design language from waffle production +
   slider grid, toggles, color pickers from dot plot.
   ============================================================ */

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "Lato", sans-serif;
  background: #ffffff;
  padding: 32px;
}

#page-layout {
  display: flex;
  flex-direction: column;
  max-width: 760px;
  gap: 0;
}

#controls {
  background: #ffffff;
  padding: 24px 24px 20px 24px;
  border-bottom: 0px solid #ddd8cc;
  font-family: "Lato", sans-serif;
}

/* ── Section labels ── */
.wc-section-label {
  font-family: "Lato", sans-serif;
  font-size: 16px;
  font-weight: 400;
  color: #666;
  text-transform: none;
  letter-spacing: 0;
  margin-bottom: 12px;
}

.wc-section-sublabel {
  font-size: 13px;
  color: #888;
  margin-bottom: 8px;
  margin-top: 14px;
}

.wc-divider {
  border: none;
  border-top: 1px solid #ddd8cc;
  margin: 20px 0;
}

/* ── Top bar: section label + toggle ── */
.wc-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

/* ── Toggle switch ── */
.wc-toggle-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.wc-toggle-label {
  font-size: 12px;
  color: #888;
}

.wc-toggle {
  position: relative;
  width: 32px;
  height: 18px;
  flex-shrink: 0;
  cursor: pointer;
}

.wc-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.wc-toggle-track {
  position: absolute;
  inset: 0;
  background: #ccc;
  border-radius: 18px;
  transition: background 0.18s;
}

.wc-toggle input:checked + .wc-toggle-track {
  background: #4E79A7;
}

.wc-toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 12px;
  height: 12px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.18s;
  pointer-events: none;
}

.wc-toggle input:checked ~ .wc-toggle-thumb {
  transform: translateX(14px);
}

/* ── Slider grid: 3 category columns ── */
.wc-slider-grid {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

/* ── Category slider block ── */
.wc-cat-slider-block {
  flex: 1;
  min-width: 0;
  background: #ffffff;
  border: 1px solid #ddd8cc;
  border-radius: 8px;
  padding: 12px;
}

/* ── Column header ── */
.wc-cat-header {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 12px;
  padding-bottom: 9px;
  border-bottom: 1px solid #ddd8cc;
  height: 28px;
}

.wc-cat-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}

.wc-cat-title {
  font-size: 11px;
  font-weight: 700;
  color: #555;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Slider rows ── */
.wc-slider-row {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  margin-bottom: 8px;
}

.wc-slider-row:last-child {
  margin-bottom: 0;
}

.wc-row-num {
  font-size: 10px;
  color: #bbb;
  width: 20px;
  flex-shrink: 0;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.wc-slider {
  flex: 1;
  min-width: 0;
  accent-color: #4E79A7;
}

.wc-val-out {
  font-size: 11px;
  font-weight: 600;
  color: #444;
  width: 30px;
  text-align: right;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

.wc-pct {
  font-weight: 400;
  color: #aaa;
  font-size: 10px;
}
#controls .wc-slider {
  accent-color: #4E79A7;
}

/* ── Three-column color picker layout ── */
.wc-colors-row {
  display: flex;
  gap: 16px;
}

.wc-color-block {
  flex: 1;
  min-width: 0;
}

.wc-color-block .wc-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 10px;
}

.wc-color-block .wc-swatch {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  cursor: pointer;
  border: 3px solid transparent;
  flex-shrink: 0;
  transition: transform 0.12s, border-color 0.12s;
}
.wc-color-block .wc-swatch:hover  { transform: scale(1.12); }
.wc-color-block .wc-swatch.active { border-color: #222; transform: scale(1.08); }

.wc-color-block .wc-hex-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.wc-color-block .wc-preview-box {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: 1px solid #ccc;
  flex-shrink: 0;
}

.wc-color-block .wc-hex-input {
  flex: 1;
  min-width: 0;
  font-family: "Courier New", monospace;
  font-size: 12px;
  padding: 5px 7px;
  border: 1px solid #ccc;
  border-radius: 8px;
  background: #fff;
  color: #222;
  outline: none;
}
.wc-color-block .wc-hex-input:focus    { border-color: #888; }
.wc-color-block .wc-hex-input.wc-error { border-color: #e15759; background: #fff5f5; }

.wc-color-block .wc-btn {
  font-family: "Lato", sans-serif;
  font-size: 14px;
  font-weight: 700;
  padding: 5px 10px;
  cursor: pointer;
 /* border-radius: 8px;
  background: #444;
  border: none;
  color: #fff; */
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
}
/*.wc-color-block .wc-btn:hover { background: #F8F5F2; color: #222; }*/

/* ── Action button row ── */
.wc-btn-row {
  display: flex;
  flex-direction: row;
  gap: 8px;
}

/* ── Action buttons: Replay / Download Image / Download Animation ──
   Two-line layout with icon above label. Equal width.
   Hover matches the site's #F8F5F2 background. ── */
.wc-action-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 12px 6px;
  font-family: "Lato", sans-serif;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  background: #444;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  min-height: 64px;
}

.wc-action-btn:hover:not(:disabled) {
  background: #F8F5F2;
  color: #222;
}

.wc-action-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.wc-action-btn .wc-btn-icon {
  display: block;
  flex-shrink: 0;
}

.wc-action-btn .wc-btn-label {
  display: block;
}

/* ── Free mode: Download Animation button — muted appearance ── */
.wc-mp4-free {
  opacity: 0.65;
}

.wc-mp4-free:hover {
  opacity: 1;
  background: #F8F5F2 !important;
  color: #222 !important;
}

/* ── Pro pill badge on free Download Animation button ── */
.wc-pro-pill {
  display: inline-flex;
  align-items: center;
  background: #E6F1FB;
  color: #185FA5;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 20px;
  margin-left: 4px;
  vertical-align: middle;
}

/* ── Banner below buttons ── */
.wc-free-banner {
  margin-top: 12px;
  font-size: 12px;
  color: #555;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}

.wc-dot { color: #aaa; }

.wc-upgrade-link {
  color: #162955;
  font-weight: bold;
  text-decoration: none;
  margin-left: 4px;
}

.wc-upgrade-link:hover { text-decoration: underline; }

/* ── "Already a member?" row ── */
.wc-member-row {
  margin-top: 8px;
  font-size: 12px;
}

.wc-member-link {
  color: #888;
  text-decoration: none;
  font-size: 12px;
  cursor: pointer;
}

.wc-member-link:hover {
  color: #162955;
  text-decoration: underline;
}

/* ── Chart wrapper ── */
#wrapper {
  padding: 20px 24px;
  background: #ffffff;
}

/* ── Responsive ── */
@media (max-width: 480px) {
  #controls {
    padding: 18px 16px 16px 16px;
  }

  .wc-btn-row {
    flex-direction: column;
    gap: 8px;
  }

  .wc-action-btn {
    flex-direction: row;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    padding: 12px 16px;
    font-size: 14px;
  }

  .wc-action-btn .wc-btn-label br {
    display: none;
  }

  .wc-slider-grid {
    flex-direction: column;
  }

  .wc-cat-slider-block {
    width: 100%;
  }

  .wc-colors-row {
    flex-direction: column;
  }
}

/* ── Active checkbox column ── */
.wc-active-block {
  flex-shrink: 0;
  width: 58px;
  background: #ffffff;
  border: 1px solid #ddd8cc;
  border-radius: 8px;
  padding: 12px 8px;
}

.wc-active-row {
  justify-content: center;
}

.wc-active-label {
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  user-select: none;
}

.wc-active-cb {
  width: 14px;
  height: 14px;
  accent-color: #4E79A7;
  cursor: pointer;
  flex-shrink: 0;
}

.wc-active-rownum {
  font-size: 10px;
  color: #bbb;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

/* ── Inactive row dimming ── */
.wc-row-inactive {
  opacity: 0.30;
  pointer-events: none;  /* sliders unclickable; checkbox still wired via JS */
}

/* Re-enable pointer events on the active checkbox column row
   so the checkbox itself stays clickable even when "inactive" */
.wc-active-block .wc-row-inactive {
  pointer-events: auto;
  opacity: 0.40;
}

/* ── Responsive: active block stays narrow on mobile ── */
@media (max-width: 480px) {
  .wc-active-block {
    width: 100%;
  }
  .wc-active-row {
    justify-content: flex-start;
    padding-left: 8px;
  }
}
