/* Рекламы.нет: shared controls. Native semantics, our visual treatment. */
:root {
  --ui-accent: var(--action, var(--audit-blue, #244fdb));
  --ui-ink: var(--text, var(--audit-ink, #20211c));
  --ui-paper: var(--pane, var(--audit-paper, #fffdf9));
  --ui-line: var(--edge, var(--audit-edge, #e5dfd2));
  --ui-scroll-thumb: #aeb9d5;
  --ui-scroll-active: #6685df;
}
* { scrollbar-width: thin; scrollbar-color: var(--ui-scroll-thumb) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track, ::-webkit-scrollbar-corner { background: transparent; }
::-webkit-scrollbar-thumb { border: 3px solid transparent; border-radius: 20px; background: var(--ui-scroll-thumb); background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: var(--ui-scroll-active); }
::selection { color: var(--ui-ink); background: #dce6ff; }

body input:is([type="checkbox"], [type="radio"]) {
  -webkit-appearance: none;
  appearance: none;
  display: inline-block;
  box-sizing: border-box;
  flex: none;
  vertical-align: middle;
  width: var(--ui-check-size, 20px);
  height: var(--ui-check-size, 20px);
  min-width: 0;
  min-height: 0;
  padding: 0;
  margin: 0;
  border: 1px solid #a6b1c9;
  border-radius: 6px;
  background: var(--ui-paper);
  background-repeat: no-repeat;
  background-position: 50% 50%;
  background-origin: border-box;
  background-size: 16px 16px;
  box-shadow: inset 0 1px 2px #16254d08;
  cursor: pointer;
  transition: background-color .14s, border-color .14s, box-shadow .14s;
}
body input[type="radio"] { border-radius: 50%; }
body input:is([type="checkbox"], [type="radio"]):hover:not(:disabled) { border-color: var(--ui-accent); box-shadow: 0 0 0 3px #244fdb0c; }
body input:is([type="checkbox"], [type="radio"]):checked,
body input[type="checkbox"]:indeterminate { border-color: var(--ui-accent); background-color: var(--ui-accent); box-shadow: inset 0 1px 1px #ffffff30; }
body input[type="checkbox"]:checked {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M4 8l3 3 5-6' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
body input[type="checkbox"]:indeterminate {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='M4 8h8' stroke='white' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
}
body input[type="radio"]:checked { background-image: radial-gradient(circle, white 0 3px, transparent 3.5px); }
body input:is([type="checkbox"], [type="radio"]):disabled { opacity: .45; cursor: not-allowed; }

body input[type="checkbox"][role="switch"] {
  position: relative;
  width: 38px;
  height: 22px;
  border-radius: 20px;
  background-image: none;
  background-color: #e5e9f2;
}
body input[type="checkbox"][role="switch"]::before {
  position: absolute;
  inset: 50% auto auto 3px;
  width: 14px;
  height: 14px;
  transform: translateY(-50%);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px #182a5633;
  content: "";
  transition: transform .16s;
}
body input[type="checkbox"][role="switch"]:checked { background-color: var(--ui-accent); }
body input[type="checkbox"][role="switch"]:checked::before { transform: translate(16px, -50%); }

body input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  min-height: 28px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
  accent-color: var(--ui-accent);
}
body input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 20px;
  background: linear-gradient(to right, var(--ui-accent) 0 var(--ui-range-fill, 50%), #dfe5f1 var(--ui-range-fill, 50%) 100%);
}
body input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  margin-top: -6px;
  border: 3px solid var(--ui-accent);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 5px #142c6630;
}
body input[type="range"]::-moz-range-track { height: 6px; border-radius: 20px; background: #dfe5f1; }
body input[type="range"]::-moz-range-progress { height: 6px; border-radius: 20px; background: var(--ui-accent); }
body input[type="range"]::-moz-range-thumb { width: 12px; height: 12px; border: 3px solid var(--ui-accent); border-radius: 50%; background: #fff; box-shadow: 0 2px 5px #142c6630; }
body input[type="range"]:disabled { opacity: .45; cursor: not-allowed; }

body select:not([multiple]):not([size]) {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%23676f84' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  background-size: 16px;
}
body :is(button, input, select, textarea, a, [tabindex]):focus-visible {
  outline: 2px solid var(--ui-accent);
  outline-offset: 3px;
}
body input:is([type="checkbox"], [type="radio"]):focus-visible { border-color: var(--ui-accent); box-shadow: 0 0 0 4px #244fdb14; }
body :is(input, textarea, select):disabled { cursor: not-allowed; }
body progress { accent-color: var(--ui-accent); }
body progress::-webkit-progress-bar { border-radius: 20px; background: #dfe5f1; }
body progress::-webkit-progress-value { border-radius: 20px; background: var(--ui-accent); }
body progress::-moz-progress-bar { border-radius: 20px; background: var(--ui-accent); }

@media (prefers-reduced-motion: reduce) {
  body input:is([type="checkbox"], [type="radio"]), body input[role="switch"]::before { transition: none; }
}
@media (forced-colors: active) {
  * { scrollbar-color: auto; }
  body input:is([type="checkbox"], [type="radio"]) { appearance: auto; background-image: none; box-shadow: none; }
  body input[type="checkbox"][role="switch"] { width: 20px; height: 20px; appearance: auto; }
  body input[type="checkbox"][role="switch"]::before { display: none; }
  body input[type="range"], body select:not([multiple]):not([size]) { appearance: auto; background-image: none; }
}

body label.voice-setting-checkbox { display: flex; align-items: center; flex-wrap: wrap; column-gap: 10px; row-gap: 5px; }

body meter { -webkit-appearance: none; appearance: none; width: 100%; height: 8px; border: 0; border-radius: 20px; background: #dfe5f1; overflow: hidden; }
body meter::-webkit-meter-bar { height: 8px; border: 0; border-radius: 20px; background: #dfe5f1; box-shadow: none; }
body meter::-webkit-meter-optimum-value { border-radius: 20px; background: var(--ui-accent); }
body meter::-webkit-meter-suboptimum-value { border-radius: 20px; background: #d78c31; }
body meter::-webkit-meter-even-less-good-value { border-radius: 20px; background: #b94650; }
body meter::-moz-meter-bar { border-radius: 20px; background: var(--ui-accent); }

/* Shared select. The OS picker is replaced; the original form value remains native. */
:root{--ui-focus:#74796f;--ui-focus-border:#a9ad9d}
body :is(button,input,select,textarea,a,[tabindex]):focus-visible{outline:2px solid var(--ui-focus);outline-offset:3px}
body :is(button,input,select,textarea,[contenteditable=true]):focus:not(:focus-visible){outline:none}
body :is(input,select,textarea,[contenteditable=true]):focus{border-color:var(--ui-focus-border);box-shadow:none}
body [contenteditable=true]:focus-visible{outline:2px solid var(--ui-focus);outline-offset:2px}
body input:is([type=checkbox],[type=radio]):focus-visible{border-color:var(--ui-focus);box-shadow:0 0 0 3px #74796f16}
body :is(.room-search,.composer):focus-within{border-color:var(--ui-focus-border)}
.ui-select{position:relative;display:block;width:100%;min-width:0}
body select.ui-select-native{position:absolute!important;width:1px!important;height:1px!important;min-width:0!important;min-height:0!important;padding:0!important;margin:0!important;border:0!important;opacity:0;clip-path:inset(50%);pointer-events:none}
.ui-select-trigger{display:flex;align-items:center;justify-content:space-between;gap:18px;width:100%;min-width:0;min-height:45px;padding:11px 13px;border:1px solid var(--ui-line);border-radius:10px;background:var(--ui-paper);font:inherit;font-size:14px;text-align:left;color:var(--ui-ink);cursor:pointer;box-shadow:none;transition:border-color .15s,background .15s}
.ui-select-trigger:hover:not(:disabled){border-color:#c5beaf;background:#fdfbf5}
.ui-select[data-open=true]>.ui-select-trigger{border-color:#bbb5a5;background:var(--ui-paper);box-shadow:0 2px 7px #282b2007}
.ui-select-caption{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ui-select-chevron{width:16px;height:16px;flex:none;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='m4 6 4 4 4-4' stroke='%23747a6f' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/16px no-repeat;transition:transform .16s}
.ui-select[data-open=true] .ui-select-chevron{transform:rotate(180deg)}
.ui-select-trigger:disabled{cursor:not-allowed;opacity:.5}
.ui-select-list{position:fixed;z-index:95;box-sizing:border-box;margin:0;padding:6px;overflow-y:auto;overscroll-behavior:contain;border:1px solid var(--ui-line);border-radius:13px;background:var(--ui-paper);box-shadow:0 10px 28px #292b2014,0 2px 6px #292b2008;color:var(--ui-ink);font:400 14px/1.45 Manrope,system-ui,sans-serif;animation:ui-select-in .13s ease-out}
.ui-select-option{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:39px;padding:9px 11px;border:1px solid transparent;border-radius:8px;cursor:pointer;overflow-wrap:anywhere}
.ui-select-option[aria-selected=true]{background:#eeece3;font-weight:650}
.ui-select-option[data-active=true]:not([aria-disabled=true]){background:#f2f0e8;border-color:#ddd7c8}
.ui-select-option[aria-disabled=true]{opacity:.4;cursor:not-allowed}
.ui-select-check{width:16px;height:16px;flex:none}
.ui-select-option[aria-selected=true]>.ui-select-check{background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='m3.5 8 3 3 6-6' stroke='%235e6a56' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/16px no-repeat}
.ui-select-group{font-size:11px;font-weight:650;color:#7a7d71;padding:10px 11px 5px}
.ui-select-error{display:block;margin-top:7px;color:#a04438;font-size:12px;line-height:1.5}
@keyframes ui-select-in{from{opacity:.5;transform:translateY(-3px)}to{opacity:1;transform:translateY(0)}}
@media(prefers-reduced-motion:reduce){.ui-select-list{animation:none}.ui-select-trigger,.ui-select-chevron{transition:none}}
@media(forced-colors:active){.ui-select-trigger,.ui-select-list,.ui-select-option[data-active=true]{border-color:CanvasText}.ui-select-check{forced-color-adjust:none}.ui-select-option[aria-selected=true]{outline:1px solid CanvasText}}

html[data-ui-focus-mode=pointer] body :is(button,input,select,textarea,a,[tabindex],[contenteditable=true]):focus{outline:none}
