/* ============================================
METABASE DASHBOARD - DARK THEME WITH PINK
APPLIES ONLY TO QUESTION PAGE (with filters)
============================================ */

/* PRIORITY: Dark background ONLY on question page (when filters exist) */
html:has([data-testid="static-question-top-bar"]),
body:has([data-testid="static-question-top-bar"]),
#root:has([data-testid="static-question-top-bar"]),
.mb-wrapper:has([data-testid="static-question-top-bar"]) {
    background-color: #1e1e1e !important;
}

/* THEME COLORS */
:root,
body,
[data-mantine-color-scheme="dark"] {
    --mb-color-background-primary: #1e1e1e !important;
    --mb-color-background-secondary: #1e1e1e !important;
    --mantine-color-body: #1e1e1e !important;
    --dashboard-fixed-width: 100% !important;
}

/* REMOVE BORDER RADIUS */
#root *,
:where(.mb-wrapper) * {
    border-radius: 0px !important;
}

/* HIDE ELEMENTS - ONLY question page specific */
[aria-label="Legend"] {
    display: none !important;
}

footer[data-testid="embedding-footer"] {
    display: none !important;
}

html:has([data-testid="static-question-top-bar"]) div[data-testid="result-toolbar"] {
    display: none !important;
}

div[data-testid="static-question-top-bar"] div.QSUlZ.C3IpM.m_b6d8b162[data-size="md"] {
    display: none !important;
}

/* HIDE DASHBOARD HEADER - only on dashboard page */
html:has([data-testid="dashboard-name-heading"][disabled]) [data-testid="dashboard-header"] {
    display: none !important;
}

/* LAYOUT SPACING */
#root>div.saodn.m_6d731127.mb-mantine-Stack-root {
    gap: 0 !important;
    --stack-gap: 0 !important;
}

/* DROPDOWN BUTTONS - PINK TEXT ONLY (active only) */
button[type="button"][aria-label]:not(:disabled):not([aria-disabled="true"]) {
    color: #ec008a !important;
}

button[type="button"][aria-label]:not(:disabled):not([aria-disabled="true"]) svg {
    color: #ec008a !important;
}

/* UPDATE FILTER BUTTON - PINK BACKGROUND (active only) */
button[type="submit"][aria-label="Update filter"]:not(:disabled):not([aria-disabled="true"]),
button[data-variant="filled"][type="submit"]:not(:disabled):not([aria-disabled="true"]) {
    background-color: #ec008a !important;
    color: #ffffff !important;
}

button[type="submit"][aria-label="Update filter"]:not(:disabled):not([aria-disabled="true"]):hover,
button[data-variant="filled"][type="submit"]:not(:disabled):not([aria-disabled="true"]):hover {
    background-color: #c20070 !important;
}

button[type="submit"][aria-label="Update filter"]:hover,
button[data-variant="filled"][type="submit"]:hover {
    background-color: #c20070 !important;
}

/* INPUT FIELDS - WHITE BORDER */
input[data-testid="single-select-list-field"] {
    border-color: #ffffff !important;
}

input[data-testid="single-select-list-field"]:focus,
input[data-testid="single-select-list-field"]:focus-visible {
    border-color: #ffffff !important;
    outline: none !important;
}

/* TABS - PINK TEXT */
div[role="tab"][aria-selected="true"] {
    color: #ec008a !important;
}

div[role="tab"][aria-selected="true"]::after {
    border-color: #ec008a !important;
}

div[role="tab"][aria-selected="false"]:hover {
    color: #ec008a !important;
}

div[role="tab"][aria-selected="false"]:hover span {
    color: #ec008a !important;
}

span[data-testid="tab-button-input-wrapper"]:hover {
    color: #ec008a !important;
}

span[data-testid="tab-button-input-wrapper"]:hover span {
    color: #ec008a !important;
}

/* DROPDOWN BORDERS - PINK ON HOVER */
.lnsju:hover {
    border-color: #ec008a !important;
}

.lnsju:hover .OVCWR {
    color: #ffffff !important;
}

/* GROUP VALUE INPUT - TEXT COLOR ONLY */
input[type="text"][placeholder="Group Value"] {
    color: #ec008a !important;
}

input[type="text"][placeholder="Group Value"]::placeholder {
    color: #ec008a !important;
}

svg.Icon.Icon-revert,
input[placeholder="Group Value"]~svg,
input[type="text"][placeholder="Group Value"] svg {
    color: #ec008a !important;
    fill: #ec008a !important;
}

/* TABLE COLUMN HEADERS - PINK TEXT */
div[role="columnheader"] .QSUlZ.C3IpM.m_b6d8b162 {
    color: #ec008a !important;
}

/* CHART TOOLTIP HEADER - PINK */
div.didcL {
    background-color: #ffffff !important;
    border-color: #ffffff !important;
    color: #000000 !important;
}

div.didcL td {
    background-color: #ffffff !important;
    color: #000000 !important;
}

div[data-testid="echarts-tooltip-header"].T9zTm {
    background-color: #ffffff !important;
    color: #000000 !important;
}

tfoot tr.gKAzj td.g3M5f,
tfoot tr.gKAzj td.g3M5f span {
    background-color: #ffffff !important;
    color: #000000 !important;
    font-weight: 900 !important;
}

div.didcL td {
    background-color: transparent !important;
}

div.didcL tr.Tb1pF td,
div.didcL tr.Tb1pF td * {
    color: #ffffff !important;
    background-color: #c20070 !important;
}

/* Change "Goal 100%" to "Tikslas 100%" in Progress bar */
span.E_0Pk {
    font-size: 0 !important;
}

span.E_0Pk::after {
    content: "Tikslas 100%";
    font-size: 14px !important;
}

/* HIDE SNAIL LINK */
a:has(svg.Icon-snail) {
    display: none !important;
}

a[aria-label*="snail"] {
    display: none !important;
}

a.QSUlZ.QB3Fo {
    display: none !important;
}
