:root {
    --step--1: clamp(0.9375rem, 0.9158rem + 0.1087vw, 1rem);
    --step-0: clamp(1.125rem, 1.0815rem + 0.2174vw, 1.25rem);
    --step-1: clamp(1.35rem, 1.2761rem + 0.3696vw, 1.5625rem);
    --step-2: clamp(1.62rem, 1.5041rem + 0.5793vw, 1.9531rem);
    --step-3: clamp(1.944rem, 1.771rem + 0.8651vw, 2.4414rem);
    --step-4: clamp(2.3328rem, 2.0827rem + 1.2504vw, 3.0518rem);
    --step-5: clamp(2.7994rem, 2.4462rem + 1.7658vw, 3.8147rem);
}

html {
    padding: 0;
    margin: 0;
}

body {
    font-family: 'Palatino Linotype', sans-serif !important;
    font-size: var(--step-0);
    display: flex;
    flex-direction: column;
    justify-content: start;
    padding: 0;
    margin: 0;
    height: 100vh;
    opacity: 0;
}

body.ready {
    opacity: 1;
    transition: 0.25s opacity;
}

body > main {
    flex: 1;
    display: flex;
    font-size: var(--step-0);
    justify-content: space-between;
    gap: 20px;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
}


section {
    flex: 1;
}

section:has(adwlm-entity-editor) {
    flex: 2;
}

section#renderer {
    flex: 1;
}

#shacl-xml-output pre,
#shacl-rdf-output pre, 
#shacl-html-output shacl-form {
    font-size: 1rem;
    width: 100%;
    text-wrap: wrap;
    white-space: pre-wrap;
    padding: 1rem;
    margin: 0;
    box-sizing: border-box;
}

/* What is below has to be removed after the header and footer components are added. */
body>footer>* {
    background: linear-gradient(45deg, #013657, #3d97f1);
    color: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    gap: 1rem;
}

body>header>* {
    color: #ffffff;
    padding: 20px;
    margin-bottom: 26px;
    background: linear-gradient(45deg, #013657, #3d97f1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

h1.title {
    margin: 0;
    flex: 1;
    text-align: center;
}

.beta-badge {
    background-color: #ff6b6b;
    color: white;
    padding: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    width: 3.5rem;
    height: 3.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    margin-right: auto;
    position: relative;
    aspect-ratio: 1;
    clip-path: polygon(100.00% 50.00%, 79.54% 55.21%, 96.98% 67.10%, 75.98% 65.00%, 88.30% 82.14%, 69.28% 72.98%, 75.00% 93.30%, 60.26% 78.19%, 58.68% 99.24%, 50.00% 80.00%, 41.32% 99.24%, 39.74% 78.19%, 25.00% 93.30%, 30.72% 72.98%, 11.70% 82.14%, 24.02% 65.00%, 3.02% 67.10%, 20.46% 55.21%, 0.00% 50.00%, 20.46% 44.79%, 3.02% 32.90%, 24.02% 35.00%, 11.70% 17.86%, 30.72% 27.02%, 25.00% 6.70%, 39.74% 21.81%, 41.32% 0.76%, 50.00% 20.00%, 58.68% 0.76%, 60.26% 21.81%, 75.00% 6.70%, 69.28% 27.02%, 88.30% 17.86%, 75.98% 35.00%, 96.98% 32.90%, 79.54% 44.79%);
}

.beta-badge:hover {
    background-color: #b62222;
    color: white;
    transform: scale(1.1);
}

.beta-popup {
    position: absolute;
    background-color: #ffffff;
    color:#013657;
    border: 1px solid #ccc;
    padding: 12px;
    border-radius: 6px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    top: 10px; /* unterhalb des Badges */
    left: 10px;
    z-index: 10;
    display: none;
    width: 250px;
}

.beta-popup p {
    margin: 0 0 8px;
    font-size: 14px;
}

.beta-popup a {
    color: #007bff;
    text-decoration: none;
}

span.footer {
    margin-right: auto;
    font-size: var(--step-0);
    font-family: 'Palatino Linotype', sans-serif;
    flex: 1;
    text-align: left;
}

img.logo {
    width: auto;
    height: 40px; /* Adjust this value to your preferred logo size */
    margin-left: auto; /* Pushes logo to the right */
}

img.logo:hover {
    transform: scale(1.2);
}

img.adw-logo {
    width: auto;
    height: 80px; /* Adjust this value to your preferred logo size */
    margin-left: auto; /* Pushes logo to the right */
    margin-top: 5px;
}

img.adw-logo:hover {
    transform: scale(1.1);
}

img.zenmem-logo {
    width: auto;
    height: 50px; /* Adjust this value to your preferred logo size */
    margin-left: auto; /* Pushes logo to the right */
    margin-top: 5px;
}

img.zenmem-logo:hover {
    transform: scale(1.1);
}

img.dfg-logo {
    width: auto;
    height: 30px; /* Adjust this value to your preferred logo size */
    margin-right: auto; /* Pushes logo to the left */
    margin-top: 5px;
}

img.dfg-logo:hover {
    transform: scale(1.1);
}

/* Add styles for the new logos */
img.new-logo-1, img.new-logo-2 {
    width: auto;
    height: 60px;
    margin: 0;
}

body>header>*,
body>footer>* {
    text-align: center;
}

fieldset#shacl-xml-output,
fieldset#shacl-rdf-output,
fieldset#shacl-html-output {
    min-height: 72vh;
    height: auto;
    max-height: 82vh;
    overflow-y: auto;
}

#shacl-xml-output.valid legend::after,
#shacl-rdf-output.valid legend::after {
    content: "[valid]";
    padding-left: 5px;
}

#shacl-xml-output.invalid legend::after,
#shacl-rdf-output.invalid legend::after {
    content: "[not valid]";
    padding-left: 5px;
}

#shacl-xml-output.valid pre,
#shacl-rdf-output.valid pre,
#shacl-xml-output.valid legend::after,
#shacl-rdf-output.valid legend::after {
    color: #272;
}

#shacl-xml-output.invalid pre,
#shacl-rdf-output.invalid pre,
#shacl-xml-output.invalid legend::after,
#shacl-rdf-output.invalid legend::after {
    color: #922;
}

section#editor-toolbar {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

section#editor-toolbar button {
    height: 40px;
    width: 60px;
}

sl-button::part(base):hover {
    background-color: var(--sl-color-primary-500);
}

sl-button::part(base) {
    --sl-color-neutral-600: var(--sl-color-primary-600);
}
sl-button[disabled]::part(base) {
    background-color: var(--sl-color-neutral-200);
    border-color: var(--sl-color-neutral-200);
    color: var(--sl-color-neutral-400);
}
sl-button::part(prefix) {
    color: var(--sl-color-neutral-0);
    margin-right: 0.3em;
    font-size: 0.75em;
}

/* small screen sizes */
@media only screen and (max-width: 664px) {
    

    h1.title {
        text-align: justify;
        padding: 10px;
        font-size: var(--step-1);
    }

    footer {
        text-align: justify;
        font-size: 15px;
    }

    section#editor-and-viewer {
        flex-direction: column;
    }

    section#editor,
    section#viewer {
        width: 100%;
        height: 70vh;
    }

    fieldset#shacl-xml-output,
    fieldset#shacl-rdf-output {
        min-height: 65vh;
        height: auto;
        max-height: 80vh;
    }

    button#save {
        height: 40px;
        width: 95vw;
    }
    nav#filesystem-nav {
        position: fixed;
        left: -100%;
        height: 100%;
        width: 80vw;
        max-width: 300px;
        background: white;
        z-index: 100;
        transition: left 0.3s ease;
        box-shadow: var(--sl-shadow-large);
    }

    nav#filesystem-nav.open {
        left: 0;
    }
    body > main {
        padding-left: 3rem; /* Space for toggle button */
        gap: 10px;
    }
    section:has(adwlm-entity-editor) {
        flex: 1;
        width: 100%;
    }
    
}

/* medium screen sizes */
@media only screen and (max-width: 900px) {
    body {
        font-size: 1.1rem;
    }

    section#editor-and-viewer {
        flex-direction: column;
    }

    section#editor,
    section#viewer {
        width: 100%;
        height: 70vh;
    }

    fieldset#shacl-xml-output,
    fieldset#shacl-rdf-output {
        height: 65vh;
    }

    button#save {
        height: 40px;
        width: 95vw;
    }
    nav#filesystem-nav {
        position: fixed;
        left: -100%;
        height: 100%;
        max-width: 30vw;
        max-width: 300px;
        z-index: 100;
        transition: left 0.3s ease;
    }

    nav#filesystem-nav.open {
        left: 0;
        max-width: 30vw;
        background-color: transparent;
    }
    body > main {
        padding-left: 3rem; /* Space for toggle button */
        gap: 10px;
    }
    section:has(adwlm-entity-editor) {
        flex: 1;
        width: 100%;
    }
}

body > footer > * {
    background: linear-gradient(45deg, #013657, #3d97f1);
    color: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    gap: 1rem;
}

.footer-left, .footer-center, .footer-right {
    display: flex;
    align-items: center;
}

.footer-left {
    flex: 1;
    justify-content: flex-start;
    gap: 1rem;
}

.footer-center {
    flex: 2;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.footer-center span.footer,
.dfg-container span {
    font-family: 'Palatino Linotype', sans-serif;
    font-size: 0.9rem;
}

.footer-center span.footer {
    flex: 0 1 auto;
    text-align: center;
}

.footer-right {
    flex: 1;
    justify-content: flex-end;
    gap: 1rem;
}

.dfg-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;  /* Changed from center to flex-start */
    gap: 0.25rem;  /* Reduced gap between logo and text */
}

.dfg-container span {
    font-size: 0.9rem;  /* Adjust size as needed */
    text-align: left;
    margin-left: 0.5rem;  /* Add small indent from logo */
}

img.dfg-logo {
    width: auto;
    height: 40px;
    margin: 0;
}

img.adw-logo {
    width: auto;
    height: 80px;
    margin: 0;
}

/* Add styles for the new logos */
img.new-logo-1, img.new-logo-2 {
    width: auto;
    height: 60px;
    margin: 0;
}

span.footer {
    margin: 0;
    font-size: var(--step-0);
    font-family: 'Palatino Linotype', sans-serif;
}

/* Adjust responsive design */
@media only screen and (max-width: 900px) {
    body > footer > * {
        flex-direction: column;
        gap: 1.5rem;
        padding: 1rem;
    }

    .footer-left, .footer-center, .footer-right {
        width: 100%;
        justify-content: center;
    }
}