/* RG COMPANY interaction standard.
   Neutral controls use one border and a quiet hover/press state.
   No blue browser focus rings, nested highlight frames, or click flashes. */

:where(
  button,
  [role="button"],
  a.btn,
  a.button-primary,
  a.button-ghost,
  a.button-virustotal,
  a.nav-download,
  a.nav-login,
  .btn,
  .icon-btn,
  .theme-toggle,
  .menu-toggle,
  .custom-select-button,
  .shot-tab,
  .side-link,
  .modal-close
) {
  -webkit-tap-highlight-color: transparent !important;
}

:where(
  button,
  [role="button"],
  a.btn,
  a.button-primary,
  a.button-ghost,
  a.button-virustotal,
  a.nav-download,
  a.nav-login,
  .btn,
  .icon-btn,
  .theme-toggle,
  .menu-toggle,
  .custom-select-button,
  .shot-tab,
  .side-link,
  .modal-close
):focus,
:where(
  button,
  [role="button"],
  a.btn,
  a.button-primary,
  a.button-ghost,
  a.button-virustotal,
  a.nav-download,
  a.nav-login,
  .btn,
  .icon-btn,
  .theme-toggle,
  .menu-toggle,
  .custom-select-button,
  .shot-tab,
  .side-link,
  .modal-close
):focus-visible {
  outline: 0 !important;
  outline-offset: 0 !important;
}

/* Cabinet: every ordinary secondary action follows the clean Telegram button. */
.admin-layout .btn:not(.primary):not(.danger):not(.logout-button),
.admin-layout .icon-btn,
.modal .btn:not(.primary):not(.danger),
.custom-select-button,
.modal-close {
  outline: 0 !important;
  outline-offset: 0 !important;
  box-shadow: none !important;
  filter: none !important;
  transform: none !important;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease, opacity .16s ease !important;
}

.admin-layout .btn:not(.primary):not(.danger):not(.logout-button):hover:not(:disabled),
.admin-layout .icon-btn:hover:not(:disabled),
.modal .btn:not(.primary):not(.danger):hover:not(:disabled),
.custom-select-button:hover:not(:disabled),
.modal-close:hover:not(:disabled) {
  background: color-mix(in srgb, var(--cab-panel, var(--panel)) 94%, var(--cab-text, var(--text)) 6%) !important;
  border-color: var(--cab-line-strong, var(--line)) !important;
  box-shadow: none !important;
  transform: none !important;
}

.admin-layout .btn:not(.primary):not(.danger):not(.logout-button):active:not(:disabled),
.admin-layout .icon-btn:active:not(:disabled),
.modal .btn:not(.primary):not(.danger):active:not(:disabled),
.custom-select-button:active:not(:disabled),
.modal-close:active:not(:disabled) {
  background: color-mix(in srgb, var(--cab-panel, var(--panel)) 90%, var(--cab-text, var(--text)) 10%) !important;
  border-color: var(--cab-line-strong, var(--line)) !important;
  box-shadow: none !important;
  transform: none !important;
}

.admin-layout .btn:not(.primary):not(.danger):not(.logout-button):focus,
.admin-layout .btn:not(.primary):not(.danger):not(.logout-button):focus-visible,
.admin-layout .icon-btn:focus,
.admin-layout .icon-btn:focus-visible,
.modal .btn:not(.primary):not(.danger):focus,
.modal .btn:not(.primary):not(.danger):focus-visible,
.custom-select-button:focus,
.custom-select-button:focus-visible,
.modal-close:focus,
.modal-close:focus-visible,
.custom-select.is-open .custom-select-button {
  outline: 0 !important;
  outline-offset: 0 !important;
  border-color: var(--cab-line-strong, var(--line)) !important;
  box-shadow: none !important;
  filter: none !important;
  transform: none !important;
}

/* Main site: ordinary light controls use the same quiet interaction. */
:where(.theme-toggle, .menu-toggle, .nav-download, .button-ghost, .button-virustotal, .shot-tab) {
  outline: 0 !important;
  outline-offset: 0 !important;
  box-shadow: none !important;
  filter: none !important;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease, opacity .16s ease !important;
}

:where(.theme-toggle, .menu-toggle, .nav-download, .button-ghost, .button-virustotal, .shot-tab):hover:not(:disabled) {
  background: color-mix(in srgb, var(--panel-2, var(--panel, #fff)) 94%, var(--text, #11151b) 6%) !important;
  border-color: var(--line, rgba(17, 24, 39, .12)) !important;
  box-shadow: none !important;
  transform: none !important;
}

:where(.theme-toggle, .menu-toggle, .nav-download, .button-ghost, .button-virustotal, .shot-tab):active:not(:disabled),
:where(.theme-toggle, .menu-toggle, .nav-download, .button-ghost, .button-virustotal, .shot-tab):focus,
:where(.theme-toggle, .menu-toggle, .nav-download, .button-ghost, .button-virustotal, .shot-tab):focus-visible {
  outline: 0 !important;
  outline-offset: 0 !important;
  border-color: var(--line, rgba(17, 24, 39, .12)) !important;
  box-shadow: none !important;
  filter: none !important;
  transform: none !important;
}

/* Filled actions keep their color, but never receive an extra browser ring. */
:where(.button-primary, .nav-login, .btn.primary, .btn.danger, .logout-button):focus,
:where(.button-primary, .nav-login, .btn.primary, .btn.danger, .logout-button):focus-visible,
:where(.button-primary, .nav-login, .btn.primary, .btn.danger, .logout-button):active {
  outline: 0 !important;
  outline-offset: 0 !important;
}

/* Notifications must be above the blurred modal layer, not underneath it. */
#toast-root {
  position: fixed !important;
  inset: auto 18px 18px auto !important;
  z-index: 40000 !important;
  isolation: isolate !important;
  pointer-events: none !important;
  filter: none !important;
  -webkit-filter: none !important;
}

#toast-root .toast {
  position: relative !important;
  inset: auto !important;
  z-index: 1 !important;
  pointer-events: auto !important;
  filter: none !important;
  -webkit-filter: none !important;
}

@media (max-width: 720px) {
  #toast-root {
    inset: auto 10px 10px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  :where(button, [role="button"], .btn, .icon-btn, .theme-toggle, .menu-toggle, .custom-select-button, .shot-tab, .side-link, .modal-close) {
    transition: none !important;
  }
}
