/*
 * Site-wide look for med-r.de on top of Bulma.
 *
 * Bulma 1.x is themed through CSS variables, so most of this file only adjusts
 * those (font, radius, shadows) and keeps light and dark mode working. The
 * remaining rules style the brand (logo in the navbar and hero), the tool cards
 * on the start page and the footer.
 */

:root {
    --bulma-family-primary: system-ui, -apple-system, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif;
    --bulma-radius: 0.5rem;
    --bulma-radius-medium: 0.625rem;
    --bulma-radius-large: 0.875rem;
    --bulma-box-radius: 0.875rem;
    --bulma-card-radius: 0.875rem;
    --bulma-box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04),
        0 4px 16px rgba(15, 23, 42, 0.06);
    --bulma-card-shadow: var(--bulma-box-shadow);
    --medr-brand: #00d1b2;
    --medr-brand-dark: #00a38b;
    --medr-accent: #3e8ed0;
}

html {
    background-color: var(--bulma-scheme-main-bis);
    scroll-behavior: smooth;
}

body {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
    -webkit-font-smoothing: antialiased;
}

.title {
    letter-spacing: -0.01em;
}

/* Navbar ---------------------------------------------------------------- */

.navbar.medr-navbar {
    position: sticky;
    top: 0.5rem;
    z-index: 30;
    margin-top: 0.5rem;
    border-radius: var(--bulma-radius-large);
    background-color: color-mix(in srgb, var(--bulma-scheme-main) 85%, transparent);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    backdrop-filter: saturate(180%) blur(12px);
    box-shadow: var(--bulma-box-shadow);
}

.medr-brand {
    gap: 0.6rem;
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: -0.02em;
}

.medr-brand-mark {
    display: block;
    width: 2rem;
    height: 2rem;
    max-height: none;
    border-radius: 0.5rem;
    box-shadow: 0 2px 6px rgba(0, 163, 139, 0.35);
}

.medr-brand-tld {
    color: var(--medr-brand-dark);
}

/* Hero ------------------------------------------------------------------ */

.hero.medr-hero {
    border-radius: var(--bulma-radius-large);
    overflow: hidden;
    background-image: linear-gradient(135deg, var(--medr-brand) 0%,
            var(--medr-brand-dark) 55%, var(--medr-accent) 130%);
    box-shadow: 0 10px 30px -12px rgba(0, 163, 139, 0.6);
}

.medr-hero .hero-body {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.medr-hero-mark {
    flex: 0 0 auto;
    width: 5rem;
    height: 5rem;
    border-radius: 1.25rem;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.35), 0 8px 24px rgba(0, 0, 0, 0.15);
}

.hero.medr-hero.is-medium .hero-body {
    padding-top: 3.5rem;
    padding-bottom: 3.5rem;
}

@media screen and (max-width: 768px) {
    .medr-hero .hero-body {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .medr-hero-mark {
        width: 3.5rem;
        height: 3.5rem;
        border-radius: 0.9rem;
    }
}

/* Tool cards on the start page ------------------------------------------ */

.card.medr-tool-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid var(--bulma-border-weak);
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.medr-tool-card .card-content {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
}

.medr-tool-card .card-content > .content {
    flex: 1 1 auto;
    color: var(--bulma-text-weak);
}

.medr-tool-card .card-content > .button {
    align-self: flex-start;
}

.card.medr-tool-card:hover,
.card.medr-tool-card:focus-within {
    transform: translateY(-2px);
    border-color: var(--medr-brand);
    box-shadow: 0 2px 4px rgba(15, 23, 42, 0.05), 0 12px 28px rgba(15, 23, 42, 0.1);
}

@media (prefers-reduced-motion: reduce) {
    .card.medr-tool-card {
        transition: none;
    }

    .card.medr-tool-card:hover,
    .card.medr-tool-card:focus-within {
        transform: none;
    }
}

/* Footer ---------------------------------------------------------------- */

.medr-footer {
    margin-top: 3rem;
    padding: 1.5rem 0 2rem;
    border-top: 1px solid var(--bulma-border-weak);
    color: var(--bulma-text-weak);
    font-size: 0.875rem;
}

.medr-footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--bulma-text);
}

.medr-footer-brand img {
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 0.3rem;
}

/* Checklisten ----------------------------------------------------------- */

/* An info line sits in the same column as the checks: the "i" takes the
   place of the checkbox, the text lines up with the item labels. */
.medr-checklist-info {
    display: flex;
    align-items: baseline;
    color: var(--bulma-text-weak);
}

/* An important check is set in bold with a red warning triangle behind it. */
.medr-checklist-important-row {
    font-weight: 600;
}

.medr-checklist-important-mark {
    margin-left: 0.4rem;
    color: var(--bulma-danger);
    font-size: 1.1rem;
    line-height: 1;
}

.medr-checklist-info-mark {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 13px;
    height: 13px;
    /* Checkbox width plus its margin, so the text lines up with the labels. */
    margin-right: 12px;
    border-radius: 50%;
    background: var(--bulma-info);
    color: var(--bulma-info-invert);
    font-size: 0.65rem;
    font-weight: 700;
    font-style: normal;
    line-height: 1;
    position: relative;
    top: 1px;
}

/* Meditor: Sprung zwischen Text und Werkzeugen ------------------------- */

/* Platz für die schwebende Navbar beim Hinscrollen. */
.medr-meditor-target {
    scroll-margin-top: 5rem;
}

.medr-meditor-switch {
    position: fixed;
    right: 1rem;
    bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
    z-index: 29;
    box-shadow: var(--bulma-box-shadow);
}

@media screen and (max-width: 768px) {
    /* Der Knopf soll das Ende der Werkzeuge nicht verdecken. */
    .medr-meditor-tools {
        padding-bottom: 4.5rem;
    }
}
