/* Styles für Live */

.einleitung > p {
    text-align: center;
}
.meldung {
    text-align: center;
}
form {
    background: #ffef8e;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    border: 3px dashed #dd9933;
}
label {
    display: block;
    margin-top: 10px;
    font-weight: bold;
}
input[type="text"],
input[type="number"],
textarea {
    width: 100%;
    padding: 2px 8px;
    margin-top: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
}
.tox {
    height: 200px !important;
}

.zugang-zeile {
    display: flex;
    align-items: center;          /* vertikal zentrieren */
    gap: 0.5rem;                  /* Abstand zwischen den Elementen */
    margin-top: 0.5rem;           /* optional: etwas Abstand nach oben */
}

.zugang-zeile label {
    white-space: nowrap;          /* Label nicht umbrechen */
}

.zugang-zeile select {
    flex: 0 1 auto;               /* Dropdown darf wachsen, aber nicht quetschen */
    background: #4CAF50;
    border-radius: 5px;
    padding: 5px;
    font-size: large;
}

.zugang-zeile button {
    margin-left: auto;            /* Button ganz nach rechts schieben */
}

.input-zeile {
    display: flex;
    align-items: center;   /* vertikal zentrieren */
    gap: 0.5rem;           /* Abstand zwischen Label und Input */
    margin-bottom: 0.5rem; /* optional: Abstand zur nächsten Zeile */
}

.input-zeile label {
    white-space: nowrap;   /* Label nur so breit wie nötig */
}

.input-zeile input {
    flex: 1;               /* Input füllt den Rest der Zeile */
}
.upload-block {
    margin-top: 0.5rem;
}

.upload-buttons {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Original-Input unsichtbar, aber funktional halten */
.upload-input-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.upload-label {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    background: #4CAF50;
    border: 1px solid #ccc;
    border-radius: 5px;
    cursor: pointer;
    white-space: nowrap;
    margin-top: 0px !important;
}

.upload-submit {
    margin-left: auto; /* Button nach rechts */
    white-space: nowrap;
    margin-bottom: 15zugpx;
}

.upload-info {
    margin-top: 0.25rem;
    font-size: 0.9rem;
    word-break: break-word;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
}

.upload-info a {
    margin-left: auto;
    white-space: nowrap;
}
.file-upload {
    margin-top: 10px;
}

.eintraege,
.eintrag,
.inhalt {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.inhalt {
    overflow-wrap: anywhere;
    word-break: break-word;
    display: flex;
    flex-direction: column;
}

.eintraege {
    margin-top: 40px;
}
.eintrag {
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.2), inset 0 -2px 4px rgba(0,0,0,0.1);

    padding: 5px 10px 5px 5px;
    margin: 0px 0px 44px;
    border-radius: 10px;
    /* Offset für Anker-Sprünge */
    scroll-margin-top: 2rem; /* Abstand zum oberen Rand beim Anspringen */
}
.eintrag-neuester {
    background: linear-gradient(135deg, #dd9933 0%, #7e5629 100%) !important;
    color: #ffef8e;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}
.eintrag-neuester > h2 {
    color: #ffef8e;
}
.eintrag-aktuelle-station {
    background: #ffef8e;
}
.eintrag-andere-station {
    background-color: #f1f1f1;
}
.eintrag-ort {
    position: absolute;
    top: -2rem;
    right: 1rem;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    padding: 0.25rem 0.7rem;
    font-size: 1rem;
    line-height: 1.25;
    font-weight: bold;
    border: 1px solid #7e5629;
    border-radius: 10px;
    background: #dd9933;
    color: #ffef8e;
}

.eintrag-person {
    font-weight: bold;
}

.eintrag-ort-name {
    white-space: nowrap;
}
.eintrag h2 {
    margin-top: 0;
    margin-left: 5px;
    margin-bottom: 3px;
    text-align: left;
}
.eingetragen {
    font-size: 1em;
    text-align: center;
    margin-top: 0px;
}

/* Permalink */
.eintrag-titel-mit-link {
    display: flex;
    align-items: baseline;
    gap: 0.35em;
    margin: 0;
}

.eintrag-permalink-btn {
    appearance: none;
    border: none;
    background: transparent;
    background-color: unset !important;
    padding: 0;
    margin: 0;
    cursor: pointer;
    font-size: 0.9em;
    line-height: 1;
    color: #555;
    opacity: 0.7;
    transition: opacity 0.15s ease, transform 0.1s ease;
}

.eintrag-permalink-btn:hover,
.eintrag-permalink-btn:focus {
    opacity: 1;
}

.eintrag-permalink-btn:active {
    transform: scale(0.95);
}

.eintrag-titel-text {
    /* Damit lange Titel umbrechen, falls nötig */
    word-break: break-word;
}

/* Optional: kleiner Hinweis "Kopiert" per Tooltip */
.eintrag-permalink-btn {
    position: relative;
}

.eintrag-permalink-btn::after {
    content: "Link kopiert";
    position: absolute;
    left: 1.4em;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.8rem;
    background: darkgreen;
    color: #ffef8e;
    padding: 0.3em 0.35em;
    border-radius: 3px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
}

.eintrag-permalink-btn.kopiert::after {
    opacity: 1;
}


/*
 * Navigations-Leiste.
 */
.navigations-leiste {
    display: flex;
    justify-content: center;
    gap: 1em;
    margin: 2em 0;
    padding: 0.5em;
    background: #ffef8e;
}
.navigations-leiste a {
    text-decoration: none;
    color: #dd9933;
    font-size: 1.2em;
    padding: 0.25em 0.75em;
    transition: background 0.2s;
}

.navigations-leiste a:hover {
    background: #1a6806;
    font-weight: bold;
    color: #ffef8e;
}
a.nach_oben {
    border-top-left-radius: 30px;
    border-top-right-radius: 30px;
}
a.nach_unten {
    border-bottom-left-radius: 30px;
    border-bottom-right-radius: 30px;
}

/*
 * Minuten und Stunden.
 */
.zeit-kurz {
    color: darkgreen;
}

/*
 * Tage.
 */
.zeit-tage {
    color: #16803c;
}

/*
 * Wochen und Monate.
 */
.zeit-wochen-monate {
    color: orange;
}

/*
 * Jahre.
 */
.zeit-jahre {
    color: #dd9933;
}

/*
 * Karte
 */
.osm-karte {
    display: block;
    width: 100%;
    max-width: 100%;
    height: 260px;
    min-height: 260px;
    margin: 15px 0 5px;
    border: 1px solid #999;
    border-radius: 10px;
    overflow: hidden;
    background: #ddd;
}


/*
 * Mediencontainer über die gesamte verfügbare Breite als zentrierte Anordnung verwenden.
 */
.medien {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

/*
 * Bilder als Blockelement behandeln.
 */
.medien .bild-vollbild {
    display: block;
    margin-left: auto;
    margin-right: auto;
    border-radius: 10px;
}
.medien img,
.medien video {
    display: block;
    width: 300px;
    max-width: 100%;
    height: auto;
    margin: 10px auto 0;
}
.medien-videos {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 15px;
}

.medien-videos video {
    display: block;
    width: 300px;
    max-width: 100%;
    height: auto;
    max-height: 250px;
    border-radius: 5px;
}
.video-element {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 300px;
    margin: 0;
}

.video-element video {
    display: block;
    width: 300px;
    max-width: 100%;
    height: auto;
}
.video-element figcaption {
    color: darkgreen;
    width: 100%;
    margin-top: 0.4rem;
    text-align: center;
    overflow-wrap: anywhere;
}
.medien-audios {
    margin: 1.5rem 0;
}

.audio-element {
    margin: 1rem 0;
}

.audio-element audio {
    width: 100%;
    max-width: 500px;
}

.audio-element figcaption {
    font-size: 0.9rem;
    color: #666;
    margin-top: 0.5rem;
}
/*
 * Kachelbereich für die anderen Stationen.
 */
h4 {
    color: #dd9933;
    text-align: center;
}
.andere-stationen {
    display: grid;
    grid-template-columns: repeat(
        auto-fill,
        minmax(120px, 1fr)
    );
    gap: 0.75rem;
    margin: 2rem auto;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

/*
 * Einzelne Stationskachel.
 */
.station-kachel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    padding: 0.6rem;
    text-align: center;
    min-width: 0;
    overflow-wrap: anywhere;
    border-radius: 10px;
    text-decoration: none;
}

.station-datum {
    display: block;
    font-size: 0.75rem;
}

.station-datum-neu {
    color: #333333;
}

.station-name {
    display: block;
    font-size: 1rem;
    font-weight: bold;
}

.station-datum-alt {
    color: #777777;
}
/*
 * Verhalten beim Überfahren mit der Maus.
 */
.station-kachel:hover {
    background-color: #dddddd;
}

.station-neu {
    background-color: #b9e4c9;
}

.station-aelter {
    background-color: #eeeeee;
}

.station-neu:hover,
.station-aelter:hover {
    background-color: #cccccc;
}

/*
 * Koordinaten-Felder in edit.php kompakt darstellen.
 */
#KoordinatenAlt,
#KoordinatenNeu {
width: 150px;
margin-right: 0em;
}

/*
 * Radio-Buttons ganz rechts mit geringem Abstand.
 */
input[type="radio"][name="koordinaten_wahl"] {
    margin-left: auto;  /* Schiebt nach rechts */
    margin-right: 0.25em;  /* Geringer Abstand zum Rand */
}

/*
 * Zeilen als Flexbox für korrekte Ausrichtung.
 */
label[for="KoordinatenAlt"],
label[for="KoordinatenNeu"] {
    display: inline-block;
    width: 200px;  /* Oder nach Bedarf anpassen */
}

/*
 * Mobile: Noch kompakter.
 */
@media (max-width: 768px) {
    #KoordinatenAlt,
    #KoordinatenNeu {
    width: 190px;
    }

    label[for="KoordinatenAlt"],
    label[for="KoordinatenNeu"] {
        width: 140px;  /* Kürzere Labels auf Mobile */
    }

    input[type="radio"][name="koordinaten_wahl"] {
        margin-right: 0.1em;  /* Noch weniger Abstand auf Mobile */
    }
}

/*
 * Deaktivierte Felder grau hinterlegen.
 */
input[disabled] {
    background: #e0e0e0;
    cursor: not-allowed;
}
/* Auf kleinen Bildschirmen */
@media (max-width: 400px) {
    .login-trigger {
        right: 0em;      /* Abstand von rechts */
        top: 1.2em;     /* Abstand von unten */
        width: 1.4em;
        height: 1em;
    }
}
@media (max-width: 768px) {
    .einleitung > p {
        font-size: small;
        margin: 0px;
        padding: 0px;
    }
    .eintraege {
        margin-top: 33px;
    }
    .eintrag-ort {
        top: -1.60rem;
        right: 0.5rem;
        padding: 0.2rem 0.6rem;
        font-size: 0.7rem;
        line-height: 1.15;
        font-weight: normal;
    }
    .eingetragen {
        font-size: x-small;
    }
    .eintraege,
    .eintrag,
    .inhalt,
    .medien,
    .andere-stationen {
        width: 100%;
        max-width: 100%;
    }

    .inhalt > p {
        display: none;
    }

    .inhalt > p.absatz1 {
        display: block;
    }

    .eintrag-ort-name {
        max-width: 70vw;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .osm-karte {
        height: 220px;
        min-height: 220px;
    }
    /* Navigation */
    a.nach_oben {
        border-top-left-radius: 5px;
        border-top-right-radius: 30px;
    }
    a.nach_unten {
        border-bottom-left-radius: 30px;
        border-bottom-right-radius: 5px;
        text-align: right;
    }
}
