/* Base element styles */

html {
    -webkit-text-size-adjust: 100%;
    scroll-padding-top: calc(var(--top-h) + 16px);
}

body,
body.dashboard-body,
body.light-grey-bg {
    font-family: var(--font);
    background: var(--bg) !important;
    color: var(--text-2);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

html.app-shell-page body {
    background: var(--bg-tint), var(--bg) !important;
    background-attachment: fixed;
}

h1,
h2,
h3,
h4,
h5,
h6,
.h-class {
    color: var(--text);
    font-family: var(--font);
    letter-spacing: -0.015em;
    text-wrap: balance;
}

a {
    color: var(--accent-ink);
    text-decoration: none;
}

a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
    text-underline-offset: 2px;
}

table,
td,
th,
time,
.badge {
    font-variant-numeric: tabular-nums;
}

::selection {
    background: var(--accent-soft-2);
}

hr {
    border-color: var(--border);
    opacity: 1;
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--scrollbar);
    border-radius: 8px;
    border: 2px solid transparent;
    background-clip: content-box;
}

* {
    scrollbar-color: var(--scrollbar) transparent;
}

/* legacy utility colours */
.grey-text,
.site-text,
.resource-text,
.text-muted,
.text-secondary,
.grey-metric-panel-header {
    color: var(--muted) !important;
}

.light-grey-text,
.a0a0a0-text,
.silver-text {
    color: var(--faint) !important;
}

.text-dark,
.dark-text,
.black-text,
.text-body {
    color: var(--text) !important;
}

.white-bg,
.bg-white {
    background: var(--surface) !important;
}

.silver-bg,
.bg-light,
.light-silver-bg,
.e0e0e0-bg {
    background: var(--surface-3) !important;
}

/* business-impact cost tile */
.orange-bg {
    background: #d9611a !important;
}

/* legacy light panels and rows */
.light-slate-bg,
.sub-segment-bg {
    background: var(--surface-3) !important;
}

.table-row-grey,
.status-dashboard-bg,
.status-dashboard-subscription-grey-bg,
tr.table-header,
.table-header {
    background: var(--surface-2) !important;
}

.table-header,
.tc-table tr,
.table-row {
    color: var(--text-2) !important;
}

.dependency-graph-info-bar {
    background: var(--surface) !important;
}

html[data-theme="dark"] .purple-1-bg {
    background: var(--accent-soft) !important;
}

.dark-green-text {
    color: var(--ok) !important;
}

/* inline backgrounds set by scripts */
[style*="background-color: white"],
[style*="background-color:white"],
[style*="background-color: #fff"],
[style*="background-color: #FFF"],
[style*="background-color: rgb(255, 255, 255)"] {
    background-color: var(--surface) !important;
}

[style*="background-color: #EAEAEA"],
[style*="background-color: #eaeaea"],
[style*="background-color: rgb(234, 234, 234)"],
[style*="background-color: #E0E0E0"],
[style*="background-color: rgb(224, 224, 224)"],
[style*="background-color: #EAECEC"],
[style*="background-color: #FAFAFA"] {
    background-color: var(--surface-3) !important;
}

html[data-theme="dark"] [style*="border: 1px solid rgb(144, 144, 144)"] {
    border-color: var(--border-strong) !important;
    color: var(--text) !important;
}

/* subscription plan cards */
html[data-theme="dark"] [style*="color: rgb(10, 94, 42)"] {
    color: var(--ok) !important;
}

/* support hub tiles */
.btn.rounded.text-center.w-100 {
    background: var(--surface-2) !important;
    color: var(--text) !important;
    border: 1px solid var(--border) !important;
}

.btn.rounded.text-center.w-100:hover {
    background: var(--surface-3) !important;
    border-color: var(--border-strong) !important;
}

.light-grey-bg,
.transparent-bg {
    background: transparent !important;
}

.caption-bg {
    background: var(--surface-2) !important;
}

.grey-border,
.light-grey-border,
.border,
.border-bottom,
.border-top,
.border-start,
.border-end,
.border-1,
.border-2 {
    border-color: var(--border) !important;
}

.kelly-green-text {
    color: var(--ok) !important;
}

.emphasized-col-text {
    color: var(--accent-ink) !important;
    font-weight: 600;
}

.shadow-sm,
.shadow {
    box-shadow: var(--sh-xs) !important;
}

.rounded {
    border-radius: var(--r) !important;
}

.rounded-top {
    border-radius: var(--r) var(--r) 0 0 !important;
}

.tc-rounded {
    border-radius: var(--r-sm) !important;
}

/* white text on coloured fills */
.white-text,
.white-text label,
.white-text span,
.white-text button,
.white-text a,
.text-white {
    color: #fff !important;
}

label,
.form-label {
    color: var(--text-2);
}

.form-label,
main label.bold-600 {
    font-weight: 600;
}
