/* media.eugster.net additions */

/* Login */
.login-panel {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: radial-gradient(circle at 20% 20%, rgba(255,255,255,.16), transparent 35%), linear-gradient(135deg, #23151a, #07070a 70%);
}

.login-card {
    width: min(520px, 92vw);
    padding: 3rem 2.5rem;
    background: rgba(20,20,24,.86);
    border: 1px solid rgba(255,255,255,.12);
    box-shadow: 0 2rem 5rem rgba(0,0,0,.45);
    border-radius: 28px;
    text-align: center;
    backdrop-filter: blur(16px);
}

.login-card h1 {
    font-size: 2.4rem;
    margin: 0 0 1rem;
}

.login-card p {
    color: rgba(255,255,255,.72);
}

.code-form {
    display: flex;
    gap: .75rem;
    margin: 2rem 0 1rem;
}

.code-form input {
    flex: 1;
    border: 0;
    border-radius: 999px;
    padding: .95rem 1.2rem;
    background: #fff;
    color: #222;
    -webkit-text-fill-color: #222;
    font-size: 1rem;
}

.code-form button,
.button.small {
    border: 0;
    border-radius: 999px;
    padding: .95rem 1.15rem;
    background: #c9464d;
    color: #fff !important;
    text-decoration: none;
    font-weight: 700;
    cursor: pointer;
}

.login-error {
    color: #ffd5d8 !important;
    background: rgba(201,70,77,.2);
    border-radius: 12px;
    padding: .75rem;
}

.login-hint {
    font-size: .8rem;
}

.login-hint code {
    background: rgba(255,255,255,.08);
    padding: .18rem .35rem;
    border-radius: .35rem;
}

/* Album intro */
.item.intro p span {
    display: block;
    margin-top: .4rem;
}

.item.intro.muted {
    background: #333;
}

/* Album: exactly like original Parallelism, only with blurred album background */
body.media-gallery {
    background-image: none !important;
    background-color: #150C07;
    overflow-x: hidden;
    overflow-y: auto;
}

body.media-gallery::before {
    content: "";
    position: fixed;
    inset: -3rem;
    z-index: 0;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    filter: blur(34px) saturate(1.15);
    transform: scale(1.08);
    opacity: .46;
}

body.media-gallery::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    background: url("images/overlay.png"), linear-gradient(to bottom, rgba(10,12,18,.05), rgba(0,0,0,.58));
    pointer-events: none;
}

body.media-gallery #wrapper,
body.media-gallery #main,
body.media-gallery #footer {
    position: relative;
    z-index: 1;
}

/* Let #main behave exactly as the template expects:
   no wrapping, no page-wide vertical image wall, horizontal scroll inside #main. */
body.media-gallery #main {
    width: min-content;
    max-width: 100vw;
    overflow-x: hidden;
    overflow-y: hidden;
    padding: 5px;
    -webkit-overflow-scrolling: touch;
}

body.media-gallery #main .items {
    display: flex;
    flex-wrap: nowrap;
}

body.media-gallery #main .items + .items {
    margin-top: 0;
}

body.media-gallery #main .items > :last-child {
    border-right: solid 10px #ffffff;
}

body.media-gallery #main .item {
    flex-grow: 0;
    flex-shrink: 0;
}

body.media-gallery #main .item.thumb img {
    image-orientation: from-image;
}

body.media-gallery #footer .icons li {
    margin-left: .75em;
}

body.media-gallery #footer .icons li:first-child {
    margin-left: 0;
}

/* Admin */
.admin-wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem;
}

.admin-card {
    background: #fff;
    color: #222;
    -webkit-text-fill-color: #222;
    border-radius: 20px;
    padding: 1.5rem;
    margin: 1rem 0;
    box-shadow: 0 1rem 3rem rgba(0,0,0,.15);
}

.admin-card,
.admin-card h1,
.admin-card h2,
.admin-card h3,
.admin-card p,
.admin-card label,
.admin-card strong,
.admin-card b,
.admin-card span,
.admin-card code {
    color: #222 !important;
    -webkit-text-fill-color: #222 !important;
}

.admin-card input,
.admin-card textarea,
.admin-card select {
    width: 100%;
    padding: .8rem;
    margin: .35rem 0 1rem;
    border: 1px solid #ddd;
    border-radius: 10px;
    color: #111 !important;
    -webkit-text-fill-color: #111 !important;
    background: #fff !important;
    opacity: 1 !important;
    font-weight: 500;
}

.admin-card input::placeholder,
.admin-card textarea::placeholder {
    color: #888 !important;
    -webkit-text-fill-color: #888 !important;
}

.admin-card button,
.admin-card .admin-btn {
    background: #c9464d;
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    border: 0;
    border-radius: 999px;
    padding: .75rem 1rem;
    text-decoration: none;
    display: inline-block;
}

.album-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px,1fr));
    gap: 1rem;
}

.mini-imgs {
    display: flex;
    gap: .35rem;
    flex-wrap: wrap;
}

.mini-imgs img {
    width: 64px;
    height: 46px;
    object-fit: cover;
    border-radius: 8px;
    image-orientation: from-image;
}

/* Admin status messages */
body .admin-wrap .admin-card.admin-status {
    background: #ffffff !important;
    border-left: .45rem solid #2e7d32 !important;
    font-weight: 700 !important;
}

body .admin-wrap .admin-card.admin-status,
body .admin-wrap .admin-card.admin-status span,
body .admin-wrap .admin-card.admin-status strong,
body .admin-wrap .admin-card.admin-status b,
body .admin-wrap .admin-card.admin-status p,
body .admin-wrap .admin-card.admin-status a {
    color: #1f7a35 !important;
    -webkit-text-fill-color: #1f7a35 !important;
}

body .admin-wrap .admin-card.admin-status-error {
    border-left-color: #b00020 !important;
}

body .admin-wrap .admin-card.admin-status-error,
body .admin-wrap .admin-card.admin-status-error span,
body .admin-wrap .admin-card.admin-status-error strong,
body .admin-wrap .admin-card.admin-status-error b,
body .admin-wrap .admin-card.admin-status-error p,
body .admin-wrap .admin-card.admin-status-error a {
    color: #b00020 !important;
    -webkit-text-fill-color: #b00020 !important;
}

/* Mobile: template's native mobile wrapping is OK */
@media screen and (max-width: 736px) {
    body.media-gallery #main {
        width: 100%;
        overflow-x: hidden;
        overflow-y: auto;
        padding: 2.5px;
    }

    body.media-gallery #main .items {
        flex-wrap: wrap;
        justify-content: center;
    }

    body.media-gallery #main .items > :last-child {
        border-right: 0;
    }

    .code-form {
        flex-direction: column;
    }

    .login-card {
        padding: 2rem 1.25rem;
    }
}

/* Footer links: hübsche Icons, aber robust und sicher klickbar */
.media-footer-actions {
    cursor: default;
    margin: 0 0 .5em 0;
    position: relative;
    z-index: 10005;
}

.media-footer-actions li {
    display: inline-block;
    font-size: 1.5em;
    margin-left: 1em;
}

.media-footer-actions li:first-child {
    margin-left: 0;
}

.media-footer-icon {
    display: inline-block !important;
    position: relative;
    width: 1.15em;
    height: 1.15em;
    line-height: 1.15em;
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    text-decoration: none !important;
    opacity: .45;
    transition: opacity .25s ease-in-out, color .25s ease-in-out, transform .25s ease-in-out;
    pointer-events: auto;
    z-index: 10006;
}

.media-footer-icon:hover {
    opacity: 1;
    color: #d64760 !important;
    -webkit-text-fill-color: #d64760 !important;
    transform: translateY(-1px);
}

.media-footer-icon::before {
    display: inline-block;
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    font-style: normal;
    font-variant: normal;
    text-rendering: auto;
    line-height: 1;
    -moz-osx-font-smoothing: grayscale;
    -webkit-font-smoothing: antialiased;
    color: inherit !important;
    -webkit-text-fill-color: inherit !important;
}

.media-footer-icon-globe::before {
    content: "\f0ac";
}

.media-footer-icon-logout::before {
    content: "\f2f5";
}

.media-footer-icon .label {
    display: none !important;
}

body.media-gallery #footer {
    z-index: 10004;
}

/* Verhindert Browser-Pull/Back-Refresh-Gesten innerhalb der horizontalen Galerie */
body.media-gallery,
body.media-gallery #main {
    overscroll-behavior-x: contain;
    overscroll-behavior-y: contain;
}


/* V12 LOGIN FIX: full-width background, no black center strip */
html body.media-login {
    background: #08080b !important;
    background-image: none !important;
    overflow: hidden !important;
}

html body.media-login::before {
    content: "" !important;
    position: fixed !important;
    inset: -48px !important;
    z-index: 0 !important;
    background-image: var(--login-bg, url("../../images/bg.jpg")) !important;
    background-position: center center !important;
    background-size: cover !important;
    background-repeat: no-repeat !important;
    filter: blur(34px) saturate(1.12) !important;
    transform: scale(1.08) !important;
    opacity: .78 !important;
}

html body.media-login::after {
    content: "" !important;
    position: fixed !important;
    inset: 0 !important;
    z-index: 0 !important;
    background:
        url("images/overlay.png"),
        radial-gradient(circle at 50% 38%, rgba(255,255,255,.14), transparent 34%),
        linear-gradient(to bottom, rgba(0,0,0,.18), rgba(0,0,0,.66)) !important;
    pointer-events: none !important;
}

html body.media-login #wrapper {
    position: relative !important;
    z-index: 1 !important;
    width: 100vw !important;
    max-width: none !important;
    min-height: 100vh !important;
    align-items: stretch !important;
    justify-content: center !important;
}

html body.media-login .login-panel {
    width: 100vw !important;
    min-width: 100vw !important;
    min-height: 100vh !important;
    padding: 2rem !important;
    background: transparent !important;
    background-image: none !important;
}

html body.media-login .login-card {
    margin: 0 auto !important;
}


/* V16 Video support */
.item.thumb.video-thumb::after {
    content: "▶";
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    pointer-events: none;
    font-size: 3.4rem;
    color: #fff;
    text-shadow: 0 0 2rem rgba(0,0,0,.9);
    opacity: .88;
}

.item.thumb.video-thumb h2::before {
    content: "Video · ";
    opacity: .7;
}

.video-placeholder {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at 50% 45%, rgba(255,255,255,.14), transparent 30%),
        linear-gradient(135deg, #1b1d26, #07080d);
}

.video-placeholder span {
    font-size: 4rem;
    color: rgba(255,255,255,.92);
    text-shadow: 0 0 2rem rgba(0,0,0,.75);
}

.media-video-modal[hidden] {
    display: none !important;
}

.media-video-modal {
    position: fixed;
    inset: 0;
    z-index: 20000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 12, 18, .88);
    backdrop-filter: blur(10px);
    padding: 3rem;
}

.media-video-stage {
    width: min(1100px, 92vw);
    max-height: 82vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.media-video-stage video,
.media-slideshow-image {
    width: 100%;
    max-height: 82vh;
    background: #000;
    box-shadow: 0 0 0 10px #fff, 0 10px 60px rgba(0,0,0,.55);
}

.media-video-close {
    position: fixed;
    top: 1.2rem;
    right: 1.4rem;
    z-index: 20001;
    width: 3rem;
    height: 3rem;
    border: 0;
    border-radius: 999px;
    background: rgba(255,255,255,.16);
    color: #fff;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
}

body.is-video-visible #wrapper {
    filter: blur(.25em);
}

.media-admin-list {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem !important;
}

.media-admin-item {
    border: 1px solid #eee;
    border-radius: 16px;
    padding: .8rem;
    background: #fafafa;
}

.media-admin-preview {
    position: relative;
    height: 130px;
    border-radius: 12px;
    overflow: hidden;
    background: #111;
    margin-bottom: .75rem;
}

.media-admin-preview img,
.media-admin-preview video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    image-orientation: from-image;
}

.media-admin-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    font-size: 2.4rem;
    text-shadow: 0 0 1rem rgba(0,0,0,.8);
}

.media-admin-edit input {
    margin-bottom: .5rem;
}

.media-admin-edit button {
    padding: .55rem .8rem;
    font-size: .9rem;
}

@media screen and (max-width: 736px) {
    .media-video-modal {
        padding: 1rem;
    }

    .media-video-stage {
        width: 96vw;
    }

    .media-video-stage video {
        box-shadow: 0 0 0 4px #fff, 0 10px 40px rgba(0,0,0,.55);
    }
}


/* V19 Admin navigation */
.admin-topbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.5rem;
    margin: 0 0 1.5rem 0;
}

.admin-topbar h1 {
    margin: 0;
}

.admin-topbar p {
    margin: .2rem 0 0 0;
    color: rgba(255,255,255,.72);
}

.admin-nav {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
    justify-content: flex-end;
    padding: .45rem;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 999px;
    backdrop-filter: blur(14px);
    box-shadow: 0 1rem 2.5rem rgba(0,0,0,.18);
}

.admin-nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.55rem;
    padding: .55rem 1rem;
    border-radius: 999px;
    background: rgba(255,255,255,.09);
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    text-decoration: none !important;
    font-weight: 700;
    line-height: 1;
    transition: background .2s ease-in-out, transform .2s ease-in-out, opacity .2s ease-in-out;
}

.admin-nav-link:hover {
    background: rgba(255,255,255,.18);
    transform: translateY(-1px);
}

.admin-nav-primary {
    background: #c9464d;
}

.admin-nav-primary:hover {
    background: #d64760;
}

@media screen and (max-width: 760px) {
    .admin-topbar {
        flex-direction: column;
    }

    .admin-nav {
        width: 100%;
        justify-content: flex-start;
        border-radius: 22px;
    }

    .admin-nav-link {
        flex: 1 1 auto;
    }
}


/* V21 Logo + text refinements */
.login-logo {
    display: block;
    width: min(220px, 64vw);
    max-height: 90px;
    object-fit: contain;
    margin: 0 auto 1.25rem auto;
}

.admin-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.admin-logo {
    display: block;
    width: 72px;
    height: 72px;
    object-fit: contain;
    flex: 0 0 auto;
    filter: drop-shadow(0 .7rem 1.2rem rgba(0,0,0,.22));
}

@media screen and (max-width: 760px) {
    .admin-brand {
        align-items: flex-start;
    }

    .admin-logo {
        width: 58px;
        height: 58px;
    }
}


/* V23 Mobile lightbox navigation
   Das Original-Parallelism-Template blendet die Poptrox-Navigation auf Mobile aus.
   Für media.eugster.net aktivieren wir sie wieder als grosse Touch-Zonen. */
@media screen and (max-width: 736px) {
    .poptrox-popup .nav-next,
    .poptrox-popup .nav-previous {
        display: block !important;
        position: absolute !important;
        top: 0 !important;
        bottom: 0 !important;
        width: 34vw !important;
        height: auto !important;
        line-height: normal !important;
        font-size: 2.8rem !important;
        color: #fff !important;
        opacity: .42 !important;
        z-index: 10003 !important;
        cursor: pointer !important;
        background: transparent !important;
        text-decoration: none !important;
        -webkit-tap-highlight-color: transparent;
    }

    .poptrox-popup .nav-next:hover,
    .poptrox-popup .nav-previous:hover,
    .poptrox-popup .nav-next:active,
    .poptrox-popup .nav-previous:active {
        opacity: .95 !important;
    }

    .poptrox-popup .nav-next {
        right: 0 !important;
        text-align: right !important;
        padding-right: 1rem !important;
    }

    .poptrox-popup .nav-previous {
        left: 0 !important;
        text-align: left !important;
        padding-left: 1rem !important;
    }

    .poptrox-popup .nav-next:before,
    .poptrox-popup .nav-previous:before {
        position: absolute !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        text-shadow: 0 0 1.2rem rgba(0,0,0,.9) !important;
    }

    .poptrox-popup .nav-next:before {
        right: 1rem !important;
    }

    .poptrox-popup .nav-previous:before {
        left: 1rem !important;
    }

    .poptrox-popup .caption {
        display: block !important;
        height: auto !important;
        min-height: 2.6rem !important;
        line-height: 1.2 !important;
        padding: .75rem 3.8rem !important;
        font-size: .95rem !important;
    }
}


/* V24 Mobile layout refinements */
@media screen and (max-width: 736px) {

    /* Titelkachel sauber innerhalb des Rasters halten */
    #main .item.thumb.style1,
    #main .item.thumb.style2 {
        margin-top: 0 !important;
        transform: none !important;
    }

    #main .item.thumb header,
    #main .item.thumb .inner {
        overflow: hidden;
    }

    /* Dateiname / Caption in mobiler Lightbox ausblenden */
    .poptrox-popup .caption {
        display: none !important;
    }

    /* Bild etwas höher positionieren, damit kein abgeschnittener Rand entsteht */
    .poptrox-popup .pic {
        margin-top: 0 !important;
    }
}


/* V25 Lightbox caption komplett ausblenden */
.poptrox-popup .caption {
    display: none !important;
}

.poptrox-popup .closer,
.poptrox-popup .nav-next,
.poptrox-popup .nav-previous {
    margin-bottom: 0 !important;
}

/* Counter, Likes und Downloads im bestehenden grauen Bildbalken */
#main .item.thumb h2 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
}

.media-tile-title {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.media-tile-meta {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    flex: 0 0 auto;
    font-size: .9em;
    line-height: 1;
}

.media-tile-stat,
.media-tile-action {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: .25rem;
    min-width: 1.35rem;
    height: 1.35rem;
    padding: 0 .25rem;
    border: 0;
    border-radius: 999px;
    background: rgba(255,255,255,.12);
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    text-decoration: none !important;
    font: inherit;
    cursor: default;
}

.media-tile-action {
    cursor: pointer;
    transition: background .18s ease-in-out, transform .18s ease-in-out, opacity .18s ease-in-out;
}

.media-tile-action:hover {
    background: rgba(255,255,255,.24);
    transform: translateY(-1px);
}

.media-like-button.is-liked,
.media-like-button.is-liked:hover {
    background: rgba(201,70,77,.92);
}

.media-like-button:disabled {
    opacity: .85;
    cursor: default;
}

.admin-feature-switches {
    display: grid;
    gap: .65rem;
    margin: .4rem 0 1.2rem;
}

.admin-card .admin-checkline {
    display: flex;
    align-items: center;
    gap: .65rem;
    margin: 0;
    padding: .75rem .85rem;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    background: #fafafa;
}

.admin-card .admin-checkline input[type="checkbox"] {
    -moz-appearance: checkbox !important;
    -webkit-appearance: checkbox !important;
    -ms-appearance: checkbox !important;
    appearance: checkbox !important;
    width: 1.15rem !important;
    height: 1.15rem !important;
    min-width: 1.15rem !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 4px !important;
    cursor: pointer;
    accent-color: #c9464d;
}

.admin-card .admin-checkline {
    cursor: pointer;
}

@media screen and (max-width: 736px) {
    #main .item.thumb h2 {
        display: flex !important;
        padding: .75rem;
        font-size: .82rem;
    }

    .media-tile-meta {
        gap: .35rem;
    }
}


/* V26 Rechtsklick-/Drag-Schutz für Thumbnails und Lightbox-Medien */
#main .item.thumb a.image img,
.poptrox-popup img,
.media-video-stage video {
    -webkit-user-select: none;
    user-select: none;
    -webkit-user-drag: none;
    -webkit-touch-callout: none;
}

/* V27 Album-Video / Slideshow */
.media-footer-icon-play {
    border: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    cursor: pointer;
    font: inherit;
    text-align: center;
}

.media-footer-icon-play::before {
    content: "\f04b";
}

.media-slideshow-modal {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    background: rgba(10,12,18,.88);
    backdrop-filter: blur(18px);
}

.media-slideshow-modal[hidden] {
    display: none !important;
}

.media-slideshow-stage {
    position: relative;
    width: min(1180px, 92vw);
    height: min(760px, 82vh);
    border-radius: 28px;
    overflow: hidden;
    background: #111;
    box-shadow: 0 2rem 6rem rgba(0,0,0,.58);
}

.media-slideshow-intro,
.media-slideshow-image {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.035);
    transition: opacity .85s ease, transform 1.25s ease;
}

.media-slideshow-intro.is-visible,
.media-slideshow-image.is-visible {
    opacity: 1;
    transform: scale(1);
}

.media-slideshow-intro {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: clamp(2rem, 5vw, 5rem);
    background: linear-gradient(135deg, #c9464d 0%, #9f2e3a 48%, #4b1722 100%);
    color: #fff;
    -webkit-text-fill-color: #fff;
}

.media-slideshow-intro::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 18% 18%, rgba(255,255,255,.22), transparent 34%),
        linear-gradient(to top, rgba(0,0,0,.34), transparent 55%);
    pointer-events: none;
}

.media-slideshow-intro h1,
.media-slideshow-intro p {
    position: relative;
    z-index: 1;
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
}

.media-slideshow-intro h1 {
    margin: 0 0 1rem;
    font-size: clamp(2.5rem, 7vw, 6rem);
    line-height: .95;
    letter-spacing: -.055em;
}

.media-slideshow-intro p {
    max-width: 48rem;
    margin: 0;
    font-size: clamp(1rem, 1.7vw, 1.35rem);
    line-height: 1.55;
    opacity: .9;
}

.media-slideshow-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #07080c;
    image-orientation: from-image;
    -webkit-user-select: none;
    user-select: none;
    -webkit-user-drag: none;
    -webkit-touch-callout: none;
}


.media-slideshow-image.is-logo-slide {
    object-fit: contain;
    padding: clamp(3rem, 8vw, 8rem);
    background: radial-gradient(circle at 50% 40%, rgba(255,255,255,.12), transparent 35%), #07080c;
}

.media-slideshow-progress {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 4px;
    background: rgba(255,255,255,.16);
    z-index: 3;
}

.media-slideshow-progress span {
    display: block;
    width: 0;
    height: 100%;
    background: rgba(255,255,255,.84);
}

.media-slideshow-close {
    position: fixed;
    top: 1.2rem;
    right: 1.2rem;
    z-index: 10051;
    width: 3rem;
    height: 3rem;
    border: 0;
    border-radius: 999px;
    background: rgba(255,255,255,.14);
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
}

.media-slideshow-close:hover {
    background: rgba(255,255,255,.24);
}

body.is-slideshow-visible {
    overflow: hidden !important;
}

@media screen and (max-width: 736px) {
    .media-slideshow-modal {
        padding: 0;
    }

    .media-slideshow-stage {
        width: 100vw;
        height: 100vh;
        border-radius: 0;
    }

    .media-slideshow-intro {
        padding: 2rem 1.4rem 4rem;
    }

    .media-slideshow-close {
        top: .8rem;
        right: .8rem;
        width: 2.7rem;
        height: 2.7rem;
        font-size: 1.7rem;
    }
}

.media-slideshow-download {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 8;
    transform: translate(-50%, -50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: min(78vw, 22rem);
    padding: 1rem 1.6rem;
    border: 1px solid rgba(255,255,255,.32);
    border-radius: 999px;
    background: rgba(0,0,0,.48);
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    font-weight: 700;
    letter-spacing: .02em;
    text-decoration: none;
    cursor: pointer;
    backdrop-filter: blur(14px);
    box-shadow: 0 1rem 3rem rgba(0,0,0,.35);
}

.media-slideshow-download:hover {
    background: rgba(255,255,255,.18);
}

.media-slideshow-download[hidden] {
    display: none !important;
}

.media-slideshow-download:disabled {
    cursor: wait;
    opacity: .72;
}


/* V31 Mobile Lightbox Pinch-Zoom: nur Zoom innerhalb der bestehenden Poptrox-Lightbox.
   Navigation, Icons und Galerie-Verhalten bleiben unverändert. */
@media screen and (max-width: 736px) {
    body.is-poptrox-visible .poptrox-popup .pic {
        overflow: hidden !important;
        touch-action: none !important;
        -ms-touch-action: none !important;
    }

    body.is-poptrox-visible .poptrox-popup .pic img {
        transform-origin: 50% 50% !important;
        will-change: transform !important;
        touch-action: none !important;
        max-width: none;
    }

    body.is-poptrox-visible .poptrox-popup .pic img.media-pinch-resetting {
        transition: transform .18s ease-out !important;
    }
}
/* ADMIN FIXES */

/* Aktiver Menüpunkt */
.admin-nav-link.active,
.admin-nav-link.is-active,
.admin-nav-link[aria-current="page"] {
    background: #ffffff !important;
    color: #111 !important;
    -webkit-text-fill-color: #111 !important;
    box-shadow: 0 0 0 1px rgba(0,0,0,.08) inset;
}

/* Checkbox-Fix gegen HTML5UP appearance:none */
.admin-card input[type="checkbox"],
.admin-checkline input[type="checkbox"],
input[type="checkbox"].admin-checkbox {
    appearance: auto !important;
    -webkit-appearance: checkbox !important;
    -moz-appearance: checkbox !important;

    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;

    width: 1.25rem !important;
    height: 1.25rem !important;
    min-width: 1.25rem !important;

    padding: 0 !important;
    margin: 0 !important;

    border: 0 !important;
    background: #fff !important;

    accent-color: #c9464d !important;
    cursor: pointer !important;

    position: relative !important;
    z-index: 5 !important;
}

/* Label klickbar */
.admin-checkline {
    cursor: pointer;
}

/* Verhindert unsichtbare Overlay-Probleme */
.admin-checkline * {
    pointer-events: auto !important;
}