/* Color switcher — designer tool.
   Floating bottom-left panel (opposite the font-switcher), only present
   when color-switcher.js decides to render it (gated by ?colors URL param).
   Uses Helvetica directly so the chrome is unaffected by anything the
   tool flips on the page tokens. */

.colorswitch {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 99999;
  width: 280px;
  background: #fff;
  border: 1px solid rgba(31, 29, 22, 0.12);
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(31, 29, 22, 0.12), 0 2px 6px rgba(31, 29, 22, 0.06);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 12px;
  color: #1f1d16;
}

.colorswitch__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px 8px 12px;
  border-bottom: 1px solid rgba(31, 29, 22, 0.08);
}

.colorswitch__title {
  font-weight: 600;
  letter-spacing: 0.02em;
}

.colorswitch__close {
  width: 22px;
  height: 22px;
  border: 0;
  background: transparent;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  color: inherit;
  padding: 0;
  border-radius: 4px;
}
.colorswitch__close:hover { background: rgba(31, 29, 22, 0.06); }

.colorswitch__body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.colorswitch--collapsed .colorswitch__body { display: none; }

.colorswitch__scope {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(31, 29, 22, 0.08);
}
.colorswitch__scope:last-of-type {
  padding-bottom: 0;
  border-bottom: 0;
}

.colorswitch__scope-title {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(31, 29, 22, 0.65);
  font-weight: 600;
}

.colorswitch__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.colorswitch__row-label {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.3;
}

.colorswitch__row-name {
  font-weight: 600;
}

.colorswitch__row-hint {
  color: rgba(31, 29, 22, 0.55);
  font-size: 10px;
  letter-spacing: 0.04em;
}

.colorswitch__toggle {
  appearance: none;
  -webkit-appearance: none;
  width: 32px;
  height: 18px;
  border-radius: 999px;
  background: rgba(31, 29, 22, 0.18);
  position: relative;
  cursor: pointer;
  margin: 0;
  flex: none;
  transition: background 160ms ease;
}
.colorswitch__toggle::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  transition: transform 160ms ease;
}
.colorswitch__toggle:checked {
  background: #1f1d16;
}
.colorswitch__toggle:checked::after {
  transform: translateX(14px);
}

.colorswitch__actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}

.colorswitch__btn {
  font: inherit;
  padding: 6px 10px;
  border: 1px solid rgba(31, 29, 22, 0.18);
  border-radius: 4px;
  background: #fff;
  color: inherit;
  cursor: pointer;
  font-size: 11px;
}
.colorswitch__btn:hover { background: rgba(31, 29, 22, 0.04); }

.colorswitch__btn--dismiss {
  color: #b91c1c;
  border-color: rgba(185, 28, 28, 0.3);
}
.colorswitch__btn--dismiss:hover { background: rgba(185, 28, 28, 0.06); }
