/* One focus edge for site controls, including fields whose border is
   painted by a wrapper. Keep validation color when the field has an error. */
:root{
  --stk-focus-edge:#34428c;
  --stk-error-edge:#c2283a;
  --stk-control-border:#84888e;
  --stk-control-text:#111315;
  --stk-control-muted:#585c62;
  --stk-control-bg:#fff;
  --stk-control-font:'IBM Plex Sans',system-ui,sans-serif;
  --stk-field-height:48px;
  --stk-field-radius:8px;
  --stk-choice-height:44px;
  --stk-choice-radius:7px;
  --stk-choice-inline:11px;
  --stk-choice-font:15px;
  --stk-label-gap:5px;
  --stk-popup-radius:12px;
  --stk-popup-shadow:0 2px 4px rgb(17 19 21 / 5%),0 8px 24px rgb(17 19 21 / 12%);
  --stk-option-radius:8px;
  --stk-option-selected:#eceef6;
  --stk-option-text:#232e64;
  --stk-choice-arrow:url("./control-chevron-v3.svg");
}
[data-stk-needs-theme="dark"]{--stk-focus-edge:#b7c1ff}
:is(button,select,input,textarea,summary,a.button,a[role="button"],[role="tab"],[role="switch"]):focus-visible{
  outline:2px solid var(--stk-focus-edge)!important;
  outline-offset:-2px!important;
  box-shadow:none!important;
}
:is(input,select,textarea,button)[aria-invalid="true"]:focus-visible,
.stk-required-missing:focus-visible{
  outline-color:var(--stk-error-edge)!important;
}
:is(input[data-pm],input[aria-label="Город"],input[data-stk-field][style*="border: 0px"],
    .stk-formula-input,.stk-fb-file-label>input):focus-visible{
  outline:0!important;
  box-shadow:none!important;
}
:is(.stk-formula-field:has(>.stk-formula-input:focus-visible),
    :is(div,span,label):has(>input[data-pm]:focus-visible),
    :is(div,span,label):has(>input[aria-label="Город"]:focus-visible),
    :is(div,span,label):has(>input[data-stk-field][style*="border: 0px"]:focus-visible),
    .stk-fb-file-label:has(>input:focus-visible)){
  outline:2px solid var(--stk-focus-edge)!important;
  outline-offset:-2px!important;
  box-shadow:none!important;
}
:is(.stk-formula-field,.stk-required-missing):has(>input:focus-visible,>textarea:focus-visible).stk-required-missing,
:is(div,span,label):has(>input[data-pm][aria-invalid="true"]:focus-visible){
  outline-color:var(--stk-error-edge)!important;
}
.orientation-pair label:has(> .orientation-title input:focus-visible){
  outline:2px solid var(--stk-focus-edge)!important;
  outline-offset:-2px!important;
}
.orientation-pair input:focus-visible{outline:0!important}

/* The constructor's select trigger is the reference for all dropdowns. */
:is(select:not([multiple],[size]),.stk-setting-combobox){
  box-sizing:border-box;
  min-height:var(--stk-choice-height)!important;
  height:auto!important;
  font:400 var(--stk-choice-font)/22px var(--stk-control-font)!important;
  border:1px solid var(--stk-control-border)!important;
  border-radius:var(--stk-choice-radius)!important;
  background-color:var(--stk-control-bg)!important;
  color:var(--stk-control-text)!important;
  box-shadow:none!important;
  cursor:pointer;
}
select:not([multiple],[size]){
  appearance:none!important;
  height:var(--stk-choice-height)!important;
  padding:8px calc(var(--stk-choice-inline) + 26px) 8px var(--stk-choice-inline)!important;
  background-image:var(--stk-choice-arrow)!important;
  background-repeat:no-repeat!important;
  background-position:right var(--stk-choice-inline) center!important;
  background-size:16px 16px!important;
  text-overflow:ellipsis;
}
:is(.stk-setting-combobox,[data-stk-editor] .stk-setting-combobox){
  padding:8px var(--stk-choice-inline)!important;
}
:is(select:not([multiple],[size]),.stk-setting-combobox):enabled:hover{
  border-color:var(--stk-control-muted)!important;
}
.stk-setting-combobox[aria-expanded=true]{border-color:var(--stk-focus-edge)!important}
select:not([multiple],[size]):open{border-color:var(--stk-focus-edge)!important}
:is(select:not([multiple],[size]),.stk-setting-combobox)[aria-invalid=true],
:is(select:not([multiple],[size]),.stk-setting-combobox).stk-required-missing{
  border-color:var(--stk-error-edge)!important;
}
:is(select:not([multiple],[size]),.stk-setting-combobox):disabled{
  cursor:default;color:#66696f!important;background-color:#f2f2ee!important;
}
.stk-form-controls .field{gap:var(--stk-label-gap)}
.stk-form-controls .field>label{
  color:var(--stk-control-muted);
  font:400 13px/18px var(--stk-control-font);
}
.stk-form-controls input:is(:not([type]),[type=text],[type=number]){
  min-height:var(--stk-field-height);
  border:1px solid var(--stk-control-border);
  border-radius:var(--stk-field-radius);
  background:var(--stk-control-bg);
  color:var(--stk-control-text);
}
.stk-form-controls input[aria-invalid=true]{border-color:var(--stk-error-edge)}
.stk-form-controls button.primary{font-weight:500}
.stk-place-city{position:relative}
.stk-place [role="combobox"]{height:var(--stk-field-height);border-radius:var(--stk-field-radius)}
.stk-place-list{
  position:absolute;z-index:5;top:100%;left:0;right:0;margin-top:4px;max-height:240px;overflow:auto;
  padding:4px;background:#fff;border:1px solid #d9d9d2;
}
.stk-place-list [role="option"],.stk-place-list p{padding:10px 12px;margin:0;line-height:24px}
.stk-place-list [role="option"]{cursor:pointer}
:is(.stk-place-list,.stk-setting-listbox){border-radius:var(--stk-popup-radius);box-shadow:var(--stk-popup-shadow)}
:is(.stk-place-list [role=option],.stk-setting-option){border-radius:var(--stk-option-radius)}
:is(.stk-place-list [role=option],.stk-setting-option)[aria-selected=true]{background:var(--stk-option-selected);color:var(--stk-option-text)}
.stk-setting-option.is-active[aria-selected=true]{background:#e1e4f1}
.stk-place-tiles{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.stk-place-tiles[data-place-choice="exposure"]{grid-template-columns:repeat(3,minmax(0,1fr))}
.stk-place .stk-place-tile{
  display:flex;flex-direction:column;align-items:center;justify-content:flex-start;
  gap:4px;padding:8px 6px;min-height:96px;min-width:0;line-height:20px;
  border:1px solid #84888e;border-radius:12px;background:#fff;font-size:14px;
}
.stk-place .stk-place-tile[aria-pressed="true"]{border-color:#34428c;background:#eceef6;color:#232e64;font-weight:600}
.stk-place-tile svg{width:100%;max-width:112px;height:52px;fill:none}
@media(max-width:420px){.stk-place-city{grid-column:1/-1}.stk-place-tile svg{height:42px}}
@media(max-width:600px){
  :root{--stk-choice-inline:9px;--stk-choice-font:16px}
}
@supports (appearance:base-select) and selector(::picker(select)){
  @media (forced-colors:none){
    select:not([multiple],[size]),select:not([multiple],[size])::picker(select){
      appearance:base-select!important;
    }
    select:not([multiple],[size])::picker-icon{display:none}
    select:not([multiple],[size])::picker(select){
      max-height:320px;
      max-width:calc(100vw - 16px);
      padding:4px;
      margin-block:4px;
      border:1px solid #d9d9d2;
      border-radius:var(--stk-popup-radius);
      background:var(--stk-control-bg);
      color:var(--stk-control-text);
      box-shadow:var(--stk-popup-shadow);
      font:400 16px/24px var(--stk-control-font);
      overscroll-behavior:contain;
    }
    select:not([multiple],[size]) option{
      min-height:44px;
      padding:10px 12px;
      border-radius:var(--stk-option-radius);
      white-space:normal;
      overflow-wrap:anywhere;
    }
    select:not([multiple],[size]) option:checked{background:var(--stk-option-selected);color:var(--stk-option-text)}
    select:not([multiple],[size]) option:enabled:hover{background:#f2f2ee}
    select:not([multiple],[size]) option::checkmark{display:none}
  }
}
@media(forced-colors:active){
  :root{--stk-focus-edge:Highlight;--stk-error-edge:LinkText}
  select:not([multiple],[size]){appearance:auto!important;background-image:none!important}
}
