@charset "UTF-8";

/* === Layout-Grundstruktur === */

html, body {
    height: 100%;
}

body {
    display: grid;
    grid-template-areas: "header header header" "nav nav nav" "sidebar main main" "footer footer footer";
    grid-template-columns: 1fr 3fr;
    grid-template-rows: auto auto 1fr auto;
    margin: 0;
    font-family: Arial, sans-serif;
}

main {
    padding-bottom: 70px;
}

header,
nav,
footer,
.sidebar,
main {
    padding: 10px;
}

header {
    grid-area: header;
    background-color: #4a6fa5;
    color: white;
    text-align: center;
}

nav {
    grid-area: nav;
    background: #333;
    color: white;
    text-align: center;
}

.sidebar {
    grid-area: sidebar;
    background: #f4f4f4;
    padding: 15px;
}

main {
    grid-area: main;
    background: #cffdeb;
    padding: 20px;
    color: black;
}

footer {
    grid-area: footer;
    background-color: #4a6fa5;
    color: white;
    text-align: center;
}


/* === Typografie & Farben === */

main p,
main h1,
main h2 {
    color: black;
}

h4 {
    font-size: var(--size-600);
    color: rgb(193, 23, 23);
    font-weight: normal;
    background: #ececec;
    padding: 0.2rem 0 0.2rem 0.5rem;
}

.rot {
    color: rgb(193, 23, 23);
}

.hilfetext {
    font-size: 0.8rem;
    font-style: italic;
    color: #009726;
}

.input-gross {
    font-size: 3rem;
}

.mittig {
    text-align: center;
}


/* === Links === */

a {
    color: #4CAF50;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

a button {
    background-color: #4a6fa5;
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 16px;
    border-radius: 5px;
    cursor: pointer;
}

button:hover {
    background-color: #35507b;
}

a button:active {
    background-color: #4a6fa5;
}


/* === Buttons === */

button {
    background: blue;
    color: whitesmoke;
    font-size: 16px;
    margin: 5px 10px;
}

.button1 {
    background: blue;
    color: white;
    padding: 10px 20px;
    border: 10px solid darkblue;
    border-radius: 10px;
    font-size: 16px;
}

.button2 {
    background-color: #4a6fa5;
    color: white;
    padding: 8px 15px;
    border: 6px solid darkgreen;
    border-radius: 10px;
    font-size: 14px;
}

.button3 {
    background-color: #4a6fa5;
    color: white;
    padding: 8px 15px;
    border: 6px solid rgb(187, 183, 183);
    border-radius: 10px;
    font-size: 8px;
}


/* === Formulare === */

select {
    font-size: 1.2em;
    padding: 10px;
    border-radius: 5px;
    height: 40px;
}


/* === Galerie === */

.galerie {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.galerie img {
    max-width: 200px;
    height: auto;
    border: 2px solid #ccc;
    border-radius: 8px;
    cursor: pointer;
}


/* === Lightbox === */

.lightbox {
    position: fixed;
    z-index: 1000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: auto;
    padding: 2rem;
}

.lightbox-content {
    max-width: 100%;
    max-height: 100%;
    text-align: center;
}

.lightbox:target {
    display: flex;
}


/* === PDF & Textanzeige === */

.pdf-wrapper,
.pdf-render-container {
    width: 100%;
    height: 100%;
    overflow: auto;
    background: #111;
    padding: 1em;
}

.pdf-frame,
.pdf-render-container canvas {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
    margin: 1em auto;
    border-radius: 8px;
    max-width: 100%;
}

.text-viewer {
    max-height: 80vh;
    overflow-y: auto;
    padding: 1em;
    background: #eee;
    color: #260557;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
}


/* === Editable Filename === */

.editable-title-wrapper {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.editable-title {
    border: 1px dashed #888;
    padding: 4px 8px;
    border-radius: 4px;
    min-width: 100px;
    background: #222;
    color: white;
}

.editable-title[contenteditable="true"] {
    background: #333;
    outline: none;
    border-color: #ccc;
}

.edit-icon {
    background: none;
    border: none;
    font-size: 1em;
    color: #ccc;
    cursor: pointer;
}


/* === Lightbox Navigation === */

.nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2em;
    color: white;
    background: rgba(0, 0, 0, 0.5);
    padding: 10px;
    border-radius: 50%;
    text-decoration: none;
    z-index: 1001;
}

.nav-left {
    left: 5%;
}

.nav-right {
    right: 5%;
}

.close-lightbox {
    position: absolute;
    top: 20px;
    right: 40px;
    z-index: 1002;
}

.close-lightbox button {
    font-size: 1em;
    padding: 8px 16px;
    border-radius: 6px;
    background: #444;
    color: white;
    border: 1px solid #ccc;
    cursor: pointer;
}


/* === Medienvorschau === */

.media-preview {
    border: 2px solid #ccc;
    border-radius: 10px;
    padding: 1em;
    width: 180px;
    text-align: center;
    font-size: 1.2em;
    cursor: pointer;
    background: #f3f3f3;
}

.media-preview:hover {
    background: #e0ffe0;
}

.media-preview.image {
    background: #e0fff8;
}

.media-preview.audio {
    background: #eaf4ff;
}

.media-preview.video {
    background: #fff0f0;
}

.media-preview.pdf {
    background: #fff8e0;
}

.media-preview.text {
    background: #f3f3f3;
}


/* === Undo/Toast === */

.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 1rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
    z-index: 2000;
}

.toast.show {
    opacity: 1;
    pointer-events: auto;
}

.undo-button {
    margin-top: 10px;
    padding: 5px 12px;
    border-radius: 6px;
    background: #444;
    color: #fff;
    border: none;
    cursor: pointer;
}

.undo-button:hover {
    background: #666;
}


/* === Footer am Bildschirmende fixieren (fixed) und Inhalt vor Überlappung schützen */

.fuss.fixed {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: #fafafa;
    box-shadow: 0 -1px 5px rgba(0,0,0,0.1);
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
}


/* === Media Queries === */

@media screen and (max-width: 55rem) {
    body {
        max-width: 50rem;
        padding: 3rem;
    }
}

@media screen and (min-width: 65rem) {
    body {
        display: grid;
        grid-template-areas: "header header" "nav nav" "sidebar main" "footer footer";
        grid-template-columns: 1fr 3fr;
        grid-template-rows: auto auto 1fr auto;
    }
}

@media (prefers-color-scheme: dark) {
    html {
        background: #232323;
    }
    body {
        color: #fff;
        background: #000;
    }
    header,
    nav,
    form,
    h1,
    h2,
    footer {
        background: #686868;
    }
}

#slideshow-container {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 800px;
    height: 500px;
    margin: 0 auto;
    background-color: #cffdeb;
}

#slideshow-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    position: absolute;
    transition: transform 1s ease, opacity 1s ease;
}