/* ================================= */
/* colors */
/* ================================= */
:root {
    --pico-primary: var(--custom-primary-base);

    --custom-primary-light-hover: color-mix(in srgb, var(--custom-primary-base) 85%, black);
    --custom-primary-dark-hover: color-mix(in srgb, var(--custom-primary-base) 90%, white);

    --custom-primary-light-focus: color-mix(in srgb, var(--custom-primary-base) 12.5%, transparent);
    --custom-primary-dark-focus: color-mix(in srgb, var(--custom-primary-base) 25%, transparent);

    --custom-dark-primary-border: color-mix(in srgb, var(--custom-primary-base) 75%, black);
    --custom-dark-primary-hover-border: color-mix(in srgb, var(--custom-primary-base) 85%, black);
    --custom-light-primary-border: color-mix(in srgb, var(--custom-primary-base) 75%, white);
    --custom-light-primary-hover-border: color-mix(in srgb, var(--custom-primary-base) 85%, white);

    --custom-dark-primary-background: color-mix(in srgb, var(--custom-primary-base) 45%, black);
    --custom-dark-primary-hover-background: color-mix(in srgb, var(--custom-primary-base) 55%, black);
    --custom-light-primary-background: color-mix(in srgb, var(--custom-primary-base) 85%, black);
    --custom-light-primary-hover-background: color-mix(in srgb, var(--custom-primary-base) 95%, black);
}

[data-theme="light"],
:root:not([data-theme="dark"]) {
    --pico-primary-hover: var(--custom-primary-light-hover);
    --pico-primary-focus: var(--custom-primary-light-focus);
    --pico-primary-border: var(--custom-light-primary-border);
    --pico-primary-hover-border: var(--custom-light-primary-hover-border);
    --pico-primary-background: var(--custom-light-primary-background);
    --pico-primary-hover-background: var(--custom-light-primary-hover-background);
}

@media only screen and (prefers-color-scheme: dark) {
    :root:not([data-theme]) {
        --pico-primary-hover: var(--custom-primary-dark-hover);
        --pico-primary-focus: var(--custom-primary-dark-focus);
        --pico-primary-border: var(--custom-dark-primary-border);
        --pico-primary-hover-border: var(--custom-dark-primary-hover-border);
        --pico-primary-background: var(--custom-dark-primary-background);
        --pico-primary-hover-background: var(--custom-dark-primary-hover-background);
    }
}

[data-theme="dark"] {
    --pico-primary-hover: var(--custom-primary-dark-hover);
    --pico-primary-focus: var(--custom-primary-dark-focus);
    --pico-primary-border: var(--custom-dark-primary-border);
    --pico-primary-hover-border: var(--custom-dark-primary-hover-border);
    --pico-primary-background: var(--custom-dark-primary-background);
    --pico-primary-hover-background: var(--custom-dark-primary-hover-background);
}

/* ================================= */
/* links */
/* ================================= */
header a,
footer a {
    --pico-color: var(--pico-secondary) !important;
    text-decoration: none !important;
}

header a:hover,
footer a:hover {
    --pico-color: var(--pico-contrast-hover) !important;
}

/* ================================= */
/* dropdown menu with svg icons */
/* ================================= */

details.dropdown summary {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

details.dropdown summary svg {
    width: 1rem;
    height: 1rem;
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    flex-shrink: 0;
}


/* ================================= */
/* Header */
/* ================================= */

header nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 1rem 0;
}

header nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
}

header nav ul li {
    margin: 0;
    list-style: none;
}

header nav #header-nav-brand {
    flex: 0 1 auto;
}

.header-site {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1rem;
    transition: color var(--pico-transition);
}

.header-site-logo {
    height: 1.5rem;
    width: 1.5rem;
    flex-shrink: 0;
}

header nav #header-nav-main {
    flex: 0 0 auto;
    gap: 2rem;
}

#header-language-hint {
    display: none;
    padding: calc(var(--pico-spacing) * 0.5) calc(var(--pico-spacing) * 2);
    margin-top: var(--pico-spacing);
    border-radius: var(--pico-border-radius);
    font-size: 0.875em;
    background-color: var(--pico-card-background-color);
    border: var(--pico-border-width) solid var(--pico-muted-border-color);
    color: var(--pico-color);
    min-height: auto;
}

/* overrite for header a tag */
#header-language-hint-link {
    text-decoration: underline !important;
    color: var(--pico-muted-color);
}

#header-language-hint-link:hover {
    color: var(--pico-primary-hover);
}

#header-language-hint-dismiss {
    background: none;
    border: none;
    font-size: 1rem;
}

#header-language-hint-dismiss:hover {
    color: var(--pico-primary-hover);
}

@media (max-width: 768px) {
    header nav {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    header nav #header-nav-brand {
        flex: 0 1 auto;
        width: 100%;
    }

    header nav #header-nav-main {
        flex-direction: column;
        gap: 1.4rem;
        align-items: flex-start;
        width: 100%;
    }
}

/* ================================= */
/* Footer styles */
/* ================================= */
footer {
    background-color: var(--pico-card-background-color);
    border-top: 1px solid var(--pico-muted-border-color);
    margin-top: 3rem;
    padding: 2rem 0;
    min-height: 15rem;
}

footer .container {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
    justify-content: space-between;
}

footer hr {
    margin-top: 6rem;
    margin-bottom: 2rem;
}

#footer-copyright {
    flex: 0 0 auto;
    padding-right: 2rem;
    padding-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--pico-muted-color);
    white-space: nowrap;
}

#footer-nav {
    display: flex;
    gap: 1rem;
}

.footer-column {
    list-style: none;
    padding: 0;
    margin: 0;
    min-width: 150px;
    flex: 1;
}

.footer-column li {
    list-style: none;
    margin-bottom: 0.25rem;
}

.footer-column-title {
    display: block;
    margin-bottom: 0.6rem;
    font-weight: 600;
    font-size: 0.9rem;
}

.footer-column-link a {
    font-size: 0.9rem;
    line-height: 1.4;
}

@media (max-width: 768px) {
    footer .container {
        flex-direction: column;
        gap: 1.5rem;
    }

    #footer-copyright {
        padding: 1rem 0;
        text-align: center;
        white-space: normal;
    }

    #footer-nav {
        flex-direction: column;
        gap: 2rem;
    }

    .footer-column {
        min-width: auto;
    }
}

/* ================================= */
/* Theme dropdown styles */
/* ================================= */
#footer-theme-dropdown {
    position: relative;
}

#footer-theme-dropdown[open]>ul {
    position: absolute;
    bottom: 100%;
    left: 0;
    margin-bottom: 0.5rem;
    min-width: 120px;
}
