/* ПСС — удобные кнопки и контролы (hit-targets, focus, варианты) */

[data-psr-theme] .mantine-Button-root {
  min-height: 40px;
  padding-inline: 16px;
  padding-block: 10px;
  font-weight: 600;
}
[data-psr-theme] .mantine-Button-root:focus-visible {
  outline: 2px solid var(--psr-accent, #1e63c6);
  outline-offset: 2px;
}

[data-psr-theme] .mantine-ActionIcon-root,
[data-psr-theme] .mantine-CloseButton-root,
[data-psr-theme] button.mantine-ActionIcon-root {
  min-width: 40px !important;
  min-height: 40px !important;
  width: 40px;
  height: 40px;
}
[data-psr-theme] .mantine-ActionIcon-root:focus-visible,
[data-psr-theme] .mantine-CloseButton-root:focus-visible {
  outline: 2px solid var(--psr-accent, #1e63c6);
  outline-offset: 2px;
}

/* Theme select on /profile */
#psr-theme-pack {
  min-height: 40px !important;
  min-width: 180px !important;
  padding: 8px 12px !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  border-radius: 8px;
  cursor: pointer;
}
#psr-theme-pack:focus-visible {
  outline: 2px solid var(--psr-accent, #f4511e);
  outline-offset: 2px;
}

/* ---- brand light variants ---- */
[data-psr-theme="brand"][data-mantine-color-scheme="light"] .mantine-Button-root[data-variant="filled"] {
  background: var(--psr-navy-soft, #153b69) !important;
  color: #f3f6fa !important;
  border-color: transparent !important;
}
[data-psr-theme="brand"][data-mantine-color-scheme="light"] .mantine-Button-root[data-variant="filled"]:hover {
  background: var(--psr-navy, #0f2747) !important;
}
[data-psr-theme="brand"][data-mantine-color-scheme="light"] .mantine-Button-root[data-variant="outline"],
[data-psr-theme="brand"][data-mantine-color-scheme="light"] .mantine-Button-root[data-variant="default"] {
  background: var(--psr-surface, #e6ebf2) !important;
  border: 1px solid var(--psr-border, #b8c4d4) !important;
  color: var(--psr-text, #243041) !important;
}
[data-psr-theme="brand"][data-mantine-color-scheme="light"] .mantine-Button-root[data-variant="light"],
[data-psr-theme="brand"][data-mantine-color-scheme="light"] .mantine-Button-root[data-variant="subtle"] {
  background: var(--psr-surface-2, #dde3ec) !important;
  color: var(--psr-navy-soft, #153b69) !important;
}

[data-psr-theme="brand"] .mantine-AppShell-header .mantine-ActionIcon-root {
  border: 1px solid var(--psr-border, #b8c4d4);
  background: var(--psr-surface-2, #dde3ec);
  color: var(--psr-muted, #5a687a);
  border-radius: 8px;
}
[data-psr-theme="brand"][data-mantine-color-scheme="dark"] .mantine-AppShell-header .mantine-ActionIcon-root {
  border-color: #333;
  background: #262626;
  color: #9ca3af;
}
[data-psr-theme="brand"] .mantine-AppShell-header .mantine-ActionIcon-root:hover {
  color: var(--psr-accent, #f4511e);
  border-color: var(--psr-accent, #f4511e);
}

/* ---- brand dark ---- */
[data-psr-theme="brand"][data-mantine-color-scheme="dark"] .mantine-Button-root[data-variant="filled"] {
  background: var(--psr-accent, #f4511e) !important;
  color: #fff !important;
  border-color: transparent !important;
}
[data-psr-theme="brand"][data-mantine-color-scheme="dark"] .mantine-Button-root[data-variant="filled"]:hover {
  background: #e64a19 !important;
}
[data-psr-theme="brand"][data-mantine-color-scheme="dark"] .mantine-Button-root[data-variant="outline"],
[data-psr-theme="brand"][data-mantine-color-scheme="dark"] .mantine-Button-root[data-variant="default"] {
  background: #1a1a1a !important;
  border: 1px solid #444 !important;
  color: #f3f4f6 !important;
}
[data-psr-theme="brand"][data-mantine-color-scheme="dark"] .mantine-Button-root[data-variant="light"],
[data-psr-theme="brand"][data-mantine-color-scheme="dark"] .mantine-Button-root[data-variant="subtle"] {
  background: #262626 !important;
  color: #f4511e !important;
}

/* ---- classic light ---- */
[data-psr-theme="classic"][data-mantine-color-scheme="light"] .mantine-Button-root[data-variant="filled"] {
  color: #fff !important;
}
[data-psr-theme="classic"][data-mantine-color-scheme="light"] .mantine-Button-root[data-variant="outline"],
[data-psr-theme="classic"][data-mantine-color-scheme="light"] .mantine-Button-root[data-variant="default"] {
  background: var(--psr-surface, #e8ebf0) !important;
  border: 1px solid var(--psr-border, #b9c2ce) !important;
  color: var(--psr-text, #2a313c) !important;
}
[data-psr-theme="classic"] .mantine-AppShell-header .mantine-ActionIcon-root {
  min-width: 40px !important;
  min-height: 40px !important;
  border-radius: 8px;
}

/* ---- ops ---- */
[data-psr-theme="ops"] .mantine-Button-root[data-variant="filled"] {
  background: var(--psr-amber, #ff8f2e) !important;
  color: #2a1704 !important;
  border-color: transparent !important;
}
[data-psr-theme="ops"] .mantine-Button-root[data-variant="outline"],
[data-psr-theme="ops"] .mantine-Button-root[data-variant="default"] {
  background: var(--psr-surface-2, #173347) !important;
  border: 1px solid var(--psr-border, #2c4a63) !important;
  color: var(--psr-text, #eaf1f6) !important;
}
[data-psr-theme="ops"] .mantine-Button-root[data-variant="light"],
[data-psr-theme="ops"] .mantine-Button-root[data-variant="subtle"] {
  background: var(--psr-surface-3, #1f4058) !important;
  color: var(--psr-amber, #ff8f2e) !important;
}
[data-psr-theme="ops"] .mantine-AppShell-header .mantine-ActionIcon-root,
[data-psr-theme="ops"] .mantine-AppShell-header button.mantine-ActionIcon-root {
  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
  min-height: 40px !important;
  border-radius: 3px;
  border: 1px solid var(--psr-border, #2c4a63);
  background: var(--psr-surface-2, #173347);
  color: var(--psr-muted, #8fa9bd);
}
[data-psr-theme="ops"] .mantine-AppShell-header .mantine-ActionIcon-root:hover {
  color: var(--psr-text, #eaf1f6);
  border-color: #66879e;
}
