/*
 * Light theme for the artist management area.
 * The portal is designed dark; the light version inverts the whole page and restores the original
 * colours of media and colour previews, so every screen gets a consistent light variant.
 */
html[data-artist-theme="light"] {
    filter: invert(1) hue-rotate(180deg);
    color-scheme: light;
}

html[data-artist-theme="dark"] {
    color-scheme: dark;
}

/* Top-layer elements are painted outside <html>, so they need their own inversion. */
html[data-artist-theme="light"] :is(dialog:modal, :popover-open) {
    filter: invert(1) hue-rotate(180deg);
}

html[data-artist-theme="light"] :is(
    img,
    video,
    iframe,
    canvas,
    picture,
    object,
    embed,
    input[type="color"],
    [style*="background-image"],
    [style*="--linkfolio-background-card-color"],
    [data-theme-preserve],
    .artist-linkfolio-public-frame,
    .artist-portal-hero__media,
    .merch-country-flag
):not(:is(.artist-linkfolio-public-frame, [data-theme-preserve], picture) *) {
    filter: invert(1) hue-rotate(180deg);
}

/* Appearance switch inside the user menu. */
.artist-private-shell__theme-switch {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 0.35rem 0.75rem;
    padding: 0.7rem 1rem;
}

.artist-private-shell__theme-options {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.25rem;
    padding: 0.2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.6rem;
    background: rgba(0, 0, 0, 0.25);
}

.artist-private-shell__theme-options button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-height: 2.1rem;
    border: 0;
    border-radius: 0.45rem;
    background: transparent;
    color: rgba(255, 255, 255, 0.66);
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.18s ease, color 0.18s ease;
}

.artist-private-shell__theme-options button:hover {
    color: #ffffff;
}

.artist-private-shell__theme-options button[aria-checked="true"] {
    background: #d7e83c;
    color: #141414;
}

.artist-private-shell__theme-options button:focus-visible {
    outline: 2px solid rgba(215, 232, 60, 0.7);
    outline-offset: 2px;
}
