/* New-message alert settings in the inbox header. */
.inbox-head { position: relative; }
.alerts-btn {
  flex: none; align-self: center; display: inline-grid; place-items: center; position: relative;
  width: 30px; height: 30px; padding: 0; border: 1px solid transparent; border-radius: 8px;
  background: transparent; color: var(--muted); cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.alerts-btn:hover, .alerts-btn[aria-expanded="true"] { background: var(--hover); color: var(--ink); }
.alerts-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.alerts-btn svg { width: 17px; height: 17px; }
.alerts-btn .alerts-slash { display: none; }
.alerts-btn.off .alerts-slash { display: inline; }
.alerts-btn.blocked::after {
  content: ""; position: absolute; top: 5px; right: 5px; width: 7px; height: 7px; border-radius: 50%;
  background: var(--warn); box-shadow: 0 0 0 2px var(--surface);
}
.alerts-pop {
  position: absolute; z-index: 30; top: 48px; right: 12px; width: 270px; max-width: calc(100% - 24px);
  display: grid; gap: 12px; padding: 14px; box-sizing: border-box;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 12px 32px rgba(17,17,26,.12), var(--shadow); color: var(--ink); font-size: 13px;
}
.alerts-pop[hidden] { display: none; }
.alerts-title { margin: 0; font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: .01em; }
.alerts-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0; cursor: pointer; }
.alerts-row[hidden] { display: none; }
.alerts-row > span { display: grid; gap: 2px; font-weight: 500; }
.alerts-row small { font-size: 11.5px; font-weight: 400; color: var(--muted); }
.alerts-pop input[type="checkbox"][role="switch"] {
  appearance: none; -webkit-appearance: none; flex: none; position: relative; box-sizing: border-box;
  width: 34px; height: 20px; margin: 0; padding: 0; border: 0;
  border-radius: 999px; background: var(--line-strong); cursor: pointer; transition: background .15s ease;
}
.alerts-pop input[type="checkbox"][role="switch"]::before {
  content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 2px rgba(17,17,26,.25); transition: transform .15s ease;
}
.alerts-pop input[type="checkbox"][role="switch"]:checked { background: var(--primary); }
.alerts-pop input[type="checkbox"][role="switch"]:checked::before { transform: translateX(14px); }
.alerts-pop input[type="checkbox"][role="switch"]:focus { box-shadow: none; }
.alerts-pop input[type="checkbox"][role="switch"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.alerts-volume { cursor: default; }
.alerts-volume label { font-weight: 500; }
.alerts-volume input[type="range"] {
  flex: 1; min-width: 0; box-sizing: border-box; height: 4px; margin: 0; padding: 0; border: 0; border-radius: 999px; cursor: pointer;
  -webkit-appearance: none; appearance: none;
  background: linear-gradient(to right, var(--primary) var(--fill, 60%), var(--line-strong) var(--fill, 60%));
}
.alerts-volume input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--line-strong); box-shadow: var(--shadow);
}
.alerts-volume input[type="range"]::-moz-range-thumb {
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--line-strong); box-shadow: var(--shadow);
}
.alerts-volume input[type="range"]:focus { box-shadow: none; }
.alerts-volume input[type="range"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.alerts-volume input[type="range"]:disabled { opacity: .45; cursor: default; }
.alerts-volume output { width: 36px; text-align: right; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.alerts-pop #alerts-test { justify-self: start; padding: 7px 12px; }
.alerts-hint { margin: 0; font-size: 12px; line-height: 1.45; color: var(--warn); }
.alerts-hint:empty { display: none; }
