/*
 * Gaby Lightbox-Player für Service-Seiten (Stani 23.11.2026).
 * Leiste oben als ruhige Glasknöpfe, HD als Goldpille, eigenes Vollbild der ganzen Lightbox, damit HD, Like,
 * Kommentare und Vollbild im Querformat oben über dem Film erreichbar bleiben. Kommentarblatt gleitet von unten
 * (Handy hochkant) oder rechts (Desktop, Handy quer) herein. Nur auf service.php geladen.
 */
:root {
    --gvp-gold: #d0b23c;
    --gvp-gold-hell: #e6cd6a;
    --gvp-gold-dunkel: #7d6210;
    --gvp-tinte: #2a241d;
    --gvp-papier: #fffdf9;
    --gvp-kurve: cubic-bezier(.32, .72, 0, 1);
}

/* Leiste */
.gaby-lightbox.has-stage-fullscreen .gaby-lightbox-actions {
    gap: .5rem;
    align-items: center;
    transition: opacity .35s var(--gvp-kurve), transform .35s var(--gvp-kurve);
}

.gaby-lightbox.has-stage-fullscreen .gaby-lightbox-actions .gallery-media-icon,
.gaby-lightbox.has-stage-fullscreen .gaby-lightbox-close {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    background: rgba(24, 19, 14, .52);
    border: 1px solid rgba(255, 255, 255, .16);
    color: #fff;
    -webkit-backdrop-filter: blur(14px) saturate(1.2);
    backdrop-filter: blur(14px) saturate(1.2);
    box-shadow: 0 10px 26px -14px rgba(0, 0, 0, .7);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background .25s var(--gvp-kurve), transform .2s var(--gvp-kurve), opacity .35s var(--gvp-kurve);
}

.gaby-lightbox.has-stage-fullscreen .gaby-lightbox-actions .gallery-media-icon:active,
.gaby-lightbox.has-stage-fullscreen .gaby-lightbox-close:active {
    transform: scale(.92);
}

.gaby-lightbox.has-stage-fullscreen .gaby-lightbox-actions .gallery-media-icon svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.gaby-lightbox.has-stage-fullscreen .gaby-lightbox-actions .gallery-media-icon-favorite svg {
    fill: currentColor;
    stroke: none;
}

/* HD als Pille: aus = Glas, an = Gold */
.gaby-lightbox.has-stage-fullscreen .gaby-lightbox-actions .service-lightbox-quality {
    width: auto;
    min-width: 52px;
    padding: 0 .9rem;
    position: relative;
    overflow: hidden;
}

.gaby-lightbox.has-stage-fullscreen .gaby-lightbox-actions .service-lightbox-quality span {
    font: 700 .78rem/1 Inter, system-ui, sans-serif;
    letter-spacing: .08em;
}

.gaby-lightbox.has-stage-fullscreen .gaby-lightbox-actions .service-lightbox-quality.is-good {
    background: linear-gradient(135deg, var(--gvp-gold-hell), var(--gvp-gold));
    border-color: rgba(255, 240, 190, .7);
    color: var(--gvp-tinte);
    box-shadow: 0 10px 26px -12px rgba(208, 178, 60, .8);
}

.gaby-lightbox.has-stage-fullscreen .gaby-lightbox-actions .service-lightbox-quality.is-switching::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, .55) 50%, transparent 80%);
    transform: translateX(-100%);
    animation: gvp-glanz 1s var(--gvp-kurve) infinite;
}

@keyframes gvp-glanz {
    to { transform: translateX(100%); }
}

/* Like-Zahl und Kommentar-Zahl als kleine Goldmarke */
.gaby-lightbox.has-stage-fullscreen .gaby-lightbox-actions .service-lightbox-like-count,
.gaby-lightbox.has-stage-fullscreen .gaby-lightbox-actions .service-lightbox-comment-count {
    position: absolute;
    top: -5px;
    right: -5px;
    bottom: auto;
    min-width: 19px;
    height: 19px;
    padding: 0 5px;
    border-radius: 999px;
    border: 0;
    background: var(--gvp-gold);
    color: var(--gvp-tinte);
    font: 700 .64rem/19px Inter, system-ui, sans-serif;
    text-align: center;
    box-shadow: 0 4px 10px -4px rgba(0, 0, 0, .6);
}

.gaby-lightbox.has-stage-fullscreen .gaby-lightbox-actions .service-lightbox-comment,
.gaby-lightbox.has-stage-fullscreen .gaby-lightbox-actions .service-lightbox-like {
    position: relative;
}

.gaby-lightbox.has-stage-fullscreen .gaby-lightbox-actions .service-lightbox-comment-count[hidden] {
    display: none;
}

/* Vollbild-Symbol wechselt */
.service-lightbox-fullscreen .fs-zu { display: none; }
.gaby-lightbox.is-stage-fullscreen .service-lightbox-fullscreen .fs-auf { display: none; }
.gaby-lightbox.is-stage-fullscreen .service-lightbox-fullscreen .fs-zu { display: inline; }

/* Eigenes Vollbild und Handy quer: Film füllt, Leiste oben über dem Bild */
.gaby-lightbox.is-stage-fullscreen,
.gaby-lightbox.is-pseudo-fullscreen {
    background: #000;
}

.gaby-lightbox.is-stage-fullscreen .gaby-lightbox-dialog {
    background: #000;
}

.gaby-lightbox.is-stage-fullscreen .gaby-lightbox-stage {
    padding: 0;
}

.gaby-lightbox.is-stage-fullscreen .gaby-lightbox-stage video {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    object-fit: contain;
    border-radius: 0;
    box-shadow: none;
    background: #000;
}

.gaby-lightbox.is-stage-fullscreen .gaby-lightbox-actions {
    top: calc(env(safe-area-inset-top, 0px) + 14px);
    right: calc(env(safe-area-inset-right, 0px) + 68px);
}

.gaby-lightbox.is-stage-fullscreen .gaby-lightbox-close {
    top: calc(env(safe-area-inset-top, 0px) + 14px);
    right: calc(env(safe-area-inset-right, 0px) + 14px);
}

@media (orientation: landscape) and (max-height: 540px) {
    .gaby-lightbox.has-stage-fullscreen .gaby-lightbox-stage {
        padding: 0;
    }

    .gaby-lightbox.has-stage-fullscreen .gaby-lightbox-stage video {
        width: 100%;
        height: 100%;
        max-width: none;
        max-height: none;
        object-fit: contain;
        border-radius: 0;
        background: #000;
    }

    .gaby-lightbox.has-stage-fullscreen .gaby-lightbox-actions {
        top: calc(env(safe-area-inset-top, 0px) + 12px);
        right: calc(env(safe-area-inset-right, 0px) + 66px);
    }

    .gaby-lightbox.has-stage-fullscreen .gaby-lightbox-close {
        top: calc(env(safe-area-inset-top, 0px) + 12px);
        right: calc(env(safe-area-inset-right, 0px) + 12px);
    }
}

/* Ruhig während der Film läuft: Knöpfe blenden aus, ein Tipp holt sie zurück */
.gaby-lightbox.is-ui-idle:not(.has-comment-sheet) .gaby-lightbox-actions,
.gaby-lightbox.is-ui-idle:not(.has-comment-sheet) .gaby-lightbox-close,
.gaby-lightbox.is-ui-idle:not(.has-comment-sheet) .gaby-lightbox-nav {
    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;
}

.gaby-lightbox.is-ui-idle:not(.has-comment-sheet) .gaby-lightbox-stage {
    cursor: none;
}

/* Kommentarblatt */
.service-comment-sheet {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 8;
    max-height: min(74%, 640px);
    display: flex;
    flex-direction: column;
    background: var(--gvp-papier);
    color: var(--gvp-tinte);
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -24px 60px -30px rgba(0, 0, 0, .7);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    transform: translateY(104%);
    transition: transform .42s var(--gvp-kurve);
    will-change: transform;
}

.service-comment-sheet[hidden] {
    display: none;
}

.service-comment-sheet.is-open {
    transform: translateY(0);
}

.service-comment-sheet__griff {
    width: 42px;
    height: 5px;
    border-radius: 999px;
    background: rgba(42, 36, 29, .16);
    margin: 10px auto 2px;
    flex: none;
}

.service-comment-sheet__kopf {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 18px 10px 22px;
    border-bottom: 1px solid rgba(125, 98, 16, .14);
    flex: none;
}

.service-comment-sheet__titel {
    margin: 0;
    font-family: "Gilda Display", Georgia, serif;
    font-weight: 400;
    font-size: 1.3rem;
    color: var(--gvp-tinte);
}

.service-comment-sheet__zu {
    width: 38px;
    height: 38px;
    border-radius: 999px;
    border: 1px solid rgba(125, 98, 16, .22);
    background: transparent;
    color: var(--gvp-gold-dunkel);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.service-comment-sheet__zu svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    fill: none;
}

.service-comment-sheet__inhalt {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

@media (min-width: 900px), (orientation: landscape) and (max-height: 540px) {
    .service-comment-sheet {
        left: auto;
        top: 0;
        width: min(400px, 46vw);
        max-height: none;
        border-radius: 24px 0 0 24px;
        box-shadow: -24px 0 60px -30px rgba(0, 0, 0, .7);
        transform: translateX(104%);
        padding-bottom: 0;
        padding-right: env(safe-area-inset-right, 0px);
    }

    .service-comment-sheet.is-open {
        transform: translateX(0);
    }

    .service-comment-sheet__griff {
        display: none;
    }

    .gaby-lightbox.has-comment-sheet .gaby-lightbox-actions {
        opacity: 0;
        pointer-events: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .service-comment-sheet,
    .gaby-lightbox.has-stage-fullscreen .gaby-lightbox-actions,
    .gaby-lightbox.has-stage-fullscreen .gaby-lightbox-actions .gallery-media-icon {
        transition: none;
    }

    .gaby-lightbox.has-stage-fullscreen .gaby-lightbox-actions .service-lightbox-quality.is-switching::after {
        animation: none;
    }
}

/* Dreh-Hinweis im Vollbild nur kurz und unter dem Film, nicht darüber */
.gaby-lightbox.is-stage-fullscreen .gaby-lightbox-rotate {
    top: auto;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 72px);
    height: auto;
    background: none;
    pointer-events: none;
    transition: opacity .5s var(--gvp-kurve);
}

.gaby-lightbox.is-ui-idle .gaby-lightbox-rotate {
    opacity: 0;
}

/* Sprechblase mit Zahl auf der Kachel, neben dem Herz */
.service-comment-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 30px;
    padding: 0 9px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 253, 249, .9);
    color: var(--gvp-tinte);
    font: 600 .74rem/1 Inter, system-ui, sans-serif;
    box-shadow: 0 6px 16px -10px rgba(0, 0, 0, .6);
    cursor: pointer;
}

.service-comment-chip svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linejoin: round;
}

.service-comment-chip.has-comments {
    color: var(--gvp-gold-dunkel);
}

/* Solange das Kommentarblatt offen ist, gehören Pfeile nicht darüber */
.gaby-lightbox.has-comment-sheet .gaby-lightbox-nav {
    opacity: 0;
    pointer-events: none;
}

/* Herz: rot auf Glas statt Grün, federnder Sprung, aufsteigende Herzen (Stani 23.11.2026) */
.gaby-lightbox.has-stage-fullscreen .gaby-lightbox-actions .gallery-media-icon-favorite.is-active {
    background: rgba(24, 19, 14, .52);
    border-color: rgba(240, 122, 140, .55);
    color: #e0435c;
}

.gaby-lightbox.has-stage-fullscreen .gaby-lightbox-actions .gallery-media-icon-favorite.is-active svg {
    fill: currentColor;
    filter: drop-shadow(0 2px 8px rgba(224, 67, 92, .55));
}

.herz-pop svg {
    animation: herz-pop .62s cubic-bezier(.32, .72, 0, 1);
    transform-origin: 50% 55%;
}

.herz-weg svg {
    animation: herz-weg .32s ease-out;
    transform-origin: 50% 55%;
}

@keyframes herz-pop {
    0% { transform: scale(1); }
    18% { transform: scale(.72); }
    48% { transform: scale(1.38); }
    70% { transform: scale(.94); }
    100% { transform: scale(1); }
}

@keyframes herz-weg {
    0% { transform: scale(1); }
    45% { transform: scale(.78); }
    100% { transform: scale(1); }
}

.herz-funke {
    position: fixed;
    z-index: 2000;
    pointer-events: none;
    fill: currentColor;
    will-change: transform, opacity;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .25));
}

.gaby-lightbox .herz-funke {
    z-index: 20;
}

@media (prefers-reduced-motion: reduce) {
    .herz-pop svg,
    .herz-weg svg {
        animation: none;
    }
}

/* Kachel-Herz ebenfalls rot statt grün */
.service-client-main .service-media-actions .service-like-button.is-active {
    color: #e0435c;
    border-color: rgba(240, 122, 140, .55);
}

.service-client-main .service-media-actions .service-like-button.is-active svg {
    fill: #e0435c;
    stroke: #e0435c;
    filter: drop-shadow(0 1px 5px rgba(224, 67, 92, .5));
}
