/* The menu "Vzhled" behind the icon of the moon: the brightness and the decorative effects. */
.appearance-wrap {
  position: relative;
  display: inline-flex;
}
.appearance {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 60;
  width: 320px;
  padding: 16px;
  border-radius: var(--sd-radius-2xl, 16px);
  border: 1px solid var(--line);
  /* solid also on the sign-in page, where a card is glass and the net moves behind it */
  background: var(--g-solid, var(--card));
  color: var(--ink);
  box-shadow: 0 18px 40px -16px rgba(15, 23, 42, 0.35);
  text-align: left;
}
.appearance[hidden] {
  display: none;
}
.ap-title {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 700;
}
.ap-h {
  margin: 12px 0 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}
.ap-group {
  display: grid;
  gap: 4px;
}
.appearance .ap-opt {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 44px;
  padding: 8px 12px;
  border: 0;
  border-radius: var(--sd-radius-xl, 12px);
  background: transparent;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.appearance .ap-opt > span:not(.ap-knob) {
  flex: 1;
  display: grid;
}
.appearance .ap-opt small {
  font-size: 12px;
  color: var(--muted);
}
.appearance .ap-opt svg {
  flex: none;
}
.appearance .ap-opt:hover {
  background: color-mix(in srgb, var(--ink) 6%, transparent);
}
.appearance .ap-opt:focus-visible {
  outline: 2px solid var(--sd-action-focus, #2563eb);
  outline-offset: 1px;
}
.appearance .ap-opt[aria-pressed='true'] {
  background: var(--sd-action-blue-bg, color-mix(in srgb, #2563eb 14%, transparent));
  color: var(--sd-action-blue-ink, inherit);
  font-weight: 600;
}
.ap-check {
  visibility: hidden;
}
.ap-opt[aria-pressed='true'] .ap-check {
  visibility: visible;
}
/* the switch: a track with a knob, the words say the state (the colour is never the only sign) */
.ap-knob {
  position: relative;
  flex: none;
  width: 44px;
  height: 26px;
  border-radius: 13px;
  background: color-mix(in srgb, var(--muted) 35%, transparent);
  transition: background 0.15s;
}
.ap-knob::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  transition: transform 0.15s;
}
.ap-switch[aria-checked='true'] .ap-knob {
  background: var(--sd-color-primary-700, #1d4ed8);
}
.ap-switch[aria-checked='true'] .ap-knob::after {
  transform: translateX(18px);
}
.appearance .ap-switch[aria-checked='true'] > .ap-off,
.appearance .ap-switch[aria-checked='false'] > .ap-on {
  display: none;
}
/* an icon before every heading of the menu (the owner, 21. 11. 2026) */
.ap-title,
.ap-h {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ap-title > i,
.ap-h > i {
  flex: none;
  width: 18px;
  text-align: center;
  color: var(--sd-action-blue-ink, #1d4ed8);
}
.ap-title > i {
  font-size: 16px;
}
.ap-h > i {
  font-size: 13px;
}
/* the size of the page (as in Rarelo): minus, the slider 70–130 %, plus and the percentage; the same size as in the menu of the user */
.ap-size {
  margin-top: 12px;
  padding-top: 4px;
  border-top: 1px solid var(--line);
}
.appearance .ap-step {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: var(--sd-radius-xl, 12px);
  background: transparent;
  color: var(--muted);
  font: inherit;
  cursor: pointer;
}
.appearance .ap-step {
  border: 1px solid var(--line);
  color: var(--ink);
}
.appearance .ap-step:hover {
  background: color-mix(in srgb, var(--ink) 6%, transparent);
}
.appearance .ap-step:focus-visible,
.ap-range input:focus-visible {
  outline: 2px solid var(--sd-action-focus, #2563eb);
  outline-offset: 1px;
}
.ap-size-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.ap-range {
  flex: 1;
  min-width: 0;
  display: grid;
}
/* not a field: no edge, padding or background of the fields of a form (html.sd input) */
html .appearance .ap-range input[type='range'] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 44px;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
}
/* drawn by us, the same in every browser (the owner, 21. 11. 2026: no white shadow of the knob of Chrome on a Mac); --fill is set by zoom.js */
.ap-range input::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(
    to right,
    var(--sd-color-primary-700, #1d4ed8) var(--fill, 50%),
    color-mix(in srgb, var(--muted) 30%, transparent) var(--fill, 50%)
  );
}
.ap-range input::-moz-range-track {
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(
    to right,
    var(--sd-color-primary-700, #1d4ed8) var(--fill, 50%),
    color-mix(in srgb, var(--muted) 30%, transparent) var(--fill, 50%)
  );
}
.ap-range input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  margin-top: -8px;
  border: 3px solid var(--card, #fff);
  border-radius: 50%;
  background: var(--sd-color-primary-700, #1d4ed8);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.35);
}
.ap-range input::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border: 3px solid var(--card, #fff);
  border-radius: 50%;
  background: var(--sd-color-primary-700, #1d4ed8);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.35);
}
.ap-scale {
  display: flex;
  justify-content: space-between;
  margin-top: -6px;
  font-size: 12px;
  color: var(--muted);
}
.ap-pct {
  flex: none;
  min-width: 52px;
  line-height: 44px;
  text-align: right;
  font-weight: 700;
  color: var(--sd-action-blue-ink, #1d4ed8);
  white-space: nowrap;
}
/* on a phone the menu is as wide as the screen, under the top bar */
@media (max-width: 640px) {
  .appearance {
    position: fixed;
    top: 72px;
    left: 16px;
    right: 16px;
    width: auto;
  }
}

/* ---- the decorative effects off: nothing moves only for the look; the turning wheels of the work in progress stay ---- */
html[data-fx='off'] .tile,
html[data-fx='off'] .tile:hover {
  transition: none;
  transform: none;
}
html[data-fx='off'] .backup-card.stale .backup-dot {
  animation: none;
}
html.sd[data-fx='off'] .nav a:hover i,
html.sd[data-fx='off'] .nav a:hover svg {
  transform: none;
  transition: none;
}
html[data-fx='off'] .ap-knob,
html[data-fx='off'] .ap-knob::after {
  transition: none;
}
