/* Global styles. Component-specific styles live in *.razor.css (CSS isolation). */

html {
    scroll-padding-top: 1rem;
}

h1:focus,
h1:focus-visible {
    outline: none;
}

/* Theme toggle: show the moon in light mode and the sun in dark mode. */
.theme-icon-dark {
    display: none;
}

[data-bs-theme="dark"] .theme-icon-light {
    display: none;
}

[data-bs-theme="dark"] .theme-icon-dark {
    display: inline-block;
}

/* Values from scanned sites can be long (CSP, cookies): wrap anywhere. */
.value-text {
    font-family: var(--bs-font-monospace);
    font-size: 0.875em;
    overflow-wrap: anywhere;
    word-break: break-word;
    white-space: pre-wrap;
}

.valid.modified:not([type="checkbox"]) {
    outline: 1px solid var(--bs-success);
}

.invalid {
    outline: 1px solid var(--bs-danger);
}

.validation-message {
    color: var(--bs-danger);
}

pre code {
    white-space: pre;
}

pre {
    background-color: var(--bs-tertiary-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: var(--bs-border-radius);
    padding: 1rem;
}

/* Native <details> used for expandable rows (no JavaScript needed). */
details > summary {
    cursor: pointer;
}

.blazor-error-boundary {
    background-color: var(--bs-danger-bg-subtle);
    color: var(--bs-danger-text-emphasis);
    padding: 1rem;
}

    .blazor-error-boundary::after {
        content: "Det oppstod en feil.";
    }
