/*
 * Copyright (c) 2025 microdat GmbH. Alle Rechte vorbehalten.
 *
 * Dieser Code ist Eigentum von microdat GmbH und darf in keiner Weise
 * verwendet, kopiert, modifiziert, verteilt, lizenziert, vermarktet oder anderweitig
 * genutzt werden. Jegliche unbefugte Nutzung ist strengstens untersagt und wird
 * rechtlich verfolgt.
 *
 * Keine Garantie oder Haftung für Fehler, Schäden oder Verluste, die durch diesen Code entstehen.
 */


:root {
    --anchor-distance: -70px;
    --color-fibu: #cc002e;
    --color-lohn: #004574;
    --color-steuer: #548d54;
    --color-microdat: #e5003b;
    --color-microdat-light: #e5003b22;
    --color-microdat-opaque: #e5003baa;

    --glass-border-width: 2px;
    --glass-border-radius: 1em;
    --glass-background: #aaa2;
    --glass-backdrop-filter: blur(12px);

    --glass-before-background: radial-gradient(circle at top left, white, #e5003b) border-box;
    --glass-before-mask: linear-gradient(black 0 0) border-box subtract, linear-gradient(black 0 0) padding-box subtract;
    --glass-before-opacity: 0.3;

    --button-border-radius: 0.5em;
}

.glass {
    position: relative;
    padding: 1em;
    z-index: 0;

    background: var(--glass-background);
    border-radius: var(--glass-border-radius);
    backdrop-filter: var(--glass-backdrop-filter);

    &::before {
        inset: 0;
        z-index: -1;
        content: "";
        position: absolute;
        border-radius: inherit;
        mask: var(--glass-before-mask);
        opacity: var(--glass-before-opacity);
        background: var(--glass-before-background);
        border: var(--glass-border-width) solid transparent;
    }
}

a[target="_blank"]:after {
    content: ' ↗';
}

/**
    Neue Klasse für Keyboard-Tasten-Visualisierung
 */
.taste {
    background-color: #F7F7F7;
    background-image: -webkit-linear-gradient(rgba(255, 255, 255, .4), rgba(127, 127, 127, .2));
    background-image: -moz-linear-gradient(rgba(255, 255, 255, .4), rgba(127, 127, 127, .2));
    background-image: -o-linear-gradient(rgba(255, 255, 255, .4), rgba(127, 127, 127, .2));
    background-image: linear-gradient(rgba(255, 255, 255, .4), rgba(127, 127, 127, .2));
    border: 1px solid;
    border-top-color: currentcolor;
    border-right-color: currentcolor;
    border-bottom-color: currentcolor;
    border-left-color: currentcolor;
    border-color: #DDD #AAA #888 #CCC;
    border-radius: 0.25em;
    font-family: inherit;
    padding: 0.1em .4em;
    white-space: nowrap;
    color: #3d3d3d;
    font-size: 80%;
}

.table-portfreigaben-ports {
    width: 100%;
    table-layout: fixed;
    margin-bottom: 1em;

    & tr > th {
        font-weight: bold;
    }

    & tr > td:first-child {
        width: 70%;
    }
}

/**
    Basis-Klasse für max-height 5em. Wird vom Kontaktformular zur height-Eingrenzung der Textarea verwendet.
 */
.max-height-5em {
    max-height: 5em;
}

.newsletter, .impressum, .center-footer {
    & p {
        color: white !important;

        & > a {
            text-decoration: underline;
        }
    }
}

.newsletter p {
    @media (min-width: 901px) {
        margin-inline: auto;
        width: 75%;
    }
}

/**
    Setzt die Hintergründe für die einzelnen Sektionen
 */
.section-image {
    color: white;

    &#kontakt-section {
        background-image: url(/wp-content/uploads/2022/07/black-g8d614c02d_1920.jpg);
        /*background-image: url(/wp-content/uploads/2022/07/train-1.jpg);*/
    }
}

/**
    Maximale Größenbeschränkung für Sektionen
 */
.full-size {
    & .container {
        max-width: 800px;
        margin: auto;
    }

    & .container.extra-size {
        max-width: 1200px;
        margin: auto;
    }
}

/**
    Bildbewegung
 */
@keyframes move-background-image {
    from {
        background-position: 0% center;
    }

    to {
        background-position: 100% center;
    }
}

.header-filter, .section-image {
    animation: move-background-image 60s alternate infinite ease-in-out;
    background-attachment: fixed;
    background-size: cover;

    &:not(.in-viewport) {
        animation-play-state: paused;
    }

    &.header-filter::before {
        background: linear-gradient(-35deg, rgba(255, 255, 255, 0.2) 0%, rgba(0, 0, 0, 0.4) 25%, rgba(255, 255, 255, 0.2) 50%, rgba(0, 0, 0, 0.2) 75%, rgba(255, 255, 255, 0.2) 100%);
        background-size: 400% 100%;
        background-position: left center;
    }
}

/**
    Vorlage "Kontakt"
 */
.contact-rows {
    gap: 1em;

    & > .wp-block-column {
        max-width: 500px;
        margin-inline: auto;

        &:first-child {
            min-width: 360px;
        }
    }

    & .business-card {
        --bussiness-card-padding: 1em;
        padding: var(--bussiness-card-padding);
        padding-bottom: 2em;

        margin: auto;
        overflow: hidden;
        max-width: 430px;

        & .headline {
            position: relative;
            margin-bottom: 2em;

            &::before {
                position: absolute;

                content: "";
                z-index: -1;
                background: rgba(255, 255, 255, 0.3);

                top: calc(-1 * var(--bussiness-card-padding));
                left: calc(-1 * var(--bussiness-card-padding));
                width: calc(100% + 2 * var(--bussiness-card-padding));
                height: calc(100% + 2 * var(--bussiness-card-padding));
            }

            & > p:first-child {
                margin: 0.1em 0.5em;
            }
        }

        & .has-large-font-size a {
            color: #fff;

            & > strong {
                font-weight: normal;
                font-size: 70%;
            }
        }
    }

    & input[type="submit"] {
        font-weight: bold;
        white-space: nowrap;
        box-shadow: none !important;

        color: #fff !important;
        opacity: 1 !important;

        transition: background-color 0.3s ease-in-out !important;

        padding: 0.9375rem 1.875rem !important;
        border-radius: var(--button-border-radius) !important;
        background-color: var(--color-microdat-opaque) !important;

        &:hover {
            background-color: var(--color-microdat) !important;
        }
    }
}
