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

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

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

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

/* ── Slider ── */
.wc-slider-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.wc-slider-label {
  font-size: 16px;
  color: #666;
  min-width: 40px;
}

#controls input[type="range"] {
  flex: 1;
  height: 6px;
  accent-color: #4E79A7;
  cursor: pointer;
}

.wc-val {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  min-width: 28px;
  text-align: right;
}

/* ── Swatches ── */
.wc-swatches {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 8px;
  margin-bottom: 4px;
}

.wc-swatch {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  cursor: pointer;
  border: 3px solid transparent;
  flex-shrink: 0;
  transition: transform 0.12s, border-color 0.12s;
}

.wc-swatch:hover  { transform: scale(1.12); }
.wc-swatch.active { border-color: #222; transform: scale(1.08); }

/* ── Hex input row ── */
.wc-hex-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.wc-preview-box {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid #ccc;
  flex-shrink: 0;
}

.wc-hex-input {
  flex: 1;
  font-family: "Courier New", monospace;
  font-size: 16px;
  padding: 8px 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
  background: #fff;
  color: #222;
  outline: none;
}

.wc-hex-input:focus    { border-color: #888; }
.wc-hex-input.wc-error { border-color: #e15759; background: #fff5f5; }

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

.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, tall enough
   to breathe. 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: stack buttons vertically on narrow screens ── */
@media (max-width: 480px) {
  #controls {
    padding: 18px 16px 16px 16px;
  }

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

  /* Full width on mobile, horizontal layout inside each button */
  .wc-action-btn {
    flex-direction: row;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    padding: 12px 16px;
    font-size: 14px;
  }

  /* On mobile the two-line label collapses to one line naturally */
  .wc-action-btn .wc-btn-label br {
    display: none;
  }

  .wc-slider-wrap {
    gap: 10px;
  }

  .wc-hex-input {
    font-size: 14px;
  }
}
