/*
 * Base styles for design system
 * Consumes semantic tokens from variables.css (loaded first, see _stylesheets.html.twig).
 */

/* Reset and base styles */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    line-height: var(--jena-line-height-base);
}

body {
    padding: 0;
    margin: 0;
    font-family: var(--jena-font-family-base), sans-serif;
    font-size: var(--jena-font-size-base);
    font-weight: var(--jena-font-weight-normal);
    color: var(--jena-color-text-primary-default);
    background-color: var(--jena-color-bg-page-default);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    margin-top: 0;
    margin-bottom: var(--jena-space-md);
    font-family: var(--jena-font-family-base), sans-serif;
    line-height: var(--jena-line-height-tight);
}

h1 {
    font-size: var(--jena-font-size-h1);
}

h2 {
    font-size: var(--jena-font-size-h2);
}

h3 {
    font-size: var(--jena-font-size-h3);
}

h4 {
    font-size: var(--jena-font-size-xl);
}

h5 {
    font-size: var(--jena-font-size-lg);
}

h6 {
    font-size: var(--jena-font-size-base);
}

p {
    margin-block: 0 var(--jena-space-md);
    font-size: var(--jena-font-size-base);
    line-height: var(--jena-line-height-base);
}

a {
    color: var(--jena-color-text-brand-link);
    text-decoration: underline;
    text-decoration-thickness: var(--jena-underline-thickness);
    text-underline-offset: var(--jena-underline-offset);
    transition: color var(--jena-transition-duration) var(--jena-transition-timing);
}

/*
 * BITV 9.1.4.1: hover/keyboard focus is shown by a thicker underline, not by
 * the color change alone. Mouse focus (:focus without :focus-visible) keeps
 * the resting look, as everywhere else in the design system.
 */
a:hover,
a:focus-visible {
    color: var(--jena-color-text-brand-link-hover);
    text-decoration-color: var(--jena-color-text-brand-link-hover);
    text-decoration-thickness: var(--jena-underline-thickness-strong);
}

a:focus-visible {
    outline: var(--jena-focus-ring-width) var(--jena-focus-ring-style) var(--jena-focus-ring-color);
    outline-offset: var(--jena-focus-ring-offset);
}

/* Fehlermeldungen */
.invalid-feedback {
    display: inline-block;
    padding: var(--jena-space-xs) var(--jena-space-sm);
    margin-top: var(--jena-space-sm);
    font-weight: var(--jena-font-weight-bold);
    color: var(--jena-color-status-error-text);
    background-color: var(--jena-color-status-error-bg);
    border: var(--jena-border-width-md) var(--jena-border-style) var(--jena-color-status-error-border);
}

.hidden {
    display: none;
}

.jena-icon-with-fallback {
    display: inline-flex;
    gap: 0.25em;
    align-items: center;
    justify-content: center;
}

.jena-pdf-icon-fallback {
    display: none;
}
