/* island — the «You» row. Solid content on the theme tokens; no glass here. */

.island .island-switch {
  appearance: none; -webkit-appearance: none; flex: none; position: relative;
  width: 51px; height: 31px; margin: 0; border-radius: 16px; background: rgb(var(--text-rgb) / 0.16);
  cursor: pointer; transition: background .2s ease;
}
/* The switch looks 51 × 31 and takes a 44 pt touch (spec §10): a transparent hit area, inside the row's 48. */
.island .island-switch::before { content: ""; position: absolute; inset: -7px -6px; }
.island .island-switch::after {
  /* The knob takes the colour Telegram picks to stand on the accent (button_text_color). */
  content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%;
  background: var(--accent-text); box-shadow: 0 1px 3px rgb(0 0 0 / 0.25); transition: transform .2s ease;
}
.island .island-switch:checked { background: var(--accent); }
.island .island-switch:checked::after { transform: translateX(20px); }
.island .island-switch:disabled { opacity: .6; cursor: progress; }
.island .island-switch:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* The label is what the button says: keep its digits steady. */
.island .row-sub { font-variant-numeric: tabular-nums; }

@media (prefers-reduced-motion: reduce) {
  .island .island-switch, .island .island-switch::after { transition: none; }
}
@media (prefers-contrast: more) {
  .island .island-switch { box-shadow: inset 0 0 0 1px var(--text); }
  .island .island-switch::after { box-shadow: 0 0 0 1px var(--text); }
}
