/* =============================================================
   Film-Overlay — ki-galerie-film-overlay.css
   Eigenstaendige Styles fuer #film-overlay.
   Kein Eingriff in ki-galerie.css oder ki-galerie-film.css.
   ============================================================= */
 
/* ── Grundgeruest ─────────────────────────────────────────── */
 
#film-overlay {
    display:        none;
    position:       fixed;
    inset:          0;
    z-index:        1000;
    background:     #111;
    color:          #eaeaea;
    flex-direction: column;
    overflow:       hidden;
}
 
#film-overlay.is-open {
    display: flex;
}
 
/* ── Backdrop (back.jpg) ──────────────────────────────────── */
 
.fo-backdrop {
    position:            fixed;
    inset:               0;
    background-size:     cover;
    background-position: center;
    background-repeat:   no-repeat;
    z-index:             0;
    filter:              blur(2px);
    opacity:             0.25;
    pointer-events:      none;
}
 
.fo-backdrop-overlay {
    position:   fixed;
    inset:      0;
    background: linear-gradient(
        to bottom,
        rgba(10, 10, 10, 0.7)   0%,
        rgba(10, 10, 10, 0.88) 60%,
        rgba(10, 10, 10, 0.96) 100%
    );
    z-index:        1;
    pointer-events: none;
}
 
#film-overlay:not(.has-backdrop) .fo-backdrop,
#film-overlay:not(.has-backdrop) .fo-backdrop-overlay {
    display: none;
}
#film-overlay:not(.has-backdrop) {
    background: #1a1a1a;
}
 
.fo-menubar,
.fo-body {
    position: relative;
    z-index:  2;
}
 
/* ── Menuleiste ───────────────────────────────────────────── */
 
.fo-menubar {
    display:       flex;
    align-items:   center;
    gap:           6px;
    padding:       8px 14px;
    background:    rgba(0, 0, 0, 0.55);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink:   0;
    transition:    opacity 0.3s ease;
}
 
#film-overlay.is-idle .fo-menubar {
    opacity:        0;
    pointer-events: none;
}
 
.fo-spacer {
    flex: 1;
}
 
.fo-btn {
    background:    rgba(255, 255, 255, 0.08);
    border:        1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    color:         #ddd;
    cursor:        pointer;
    font-size:     14px;
    padding:       5px 11px;
    line-height:   1.3;
    transition:    background 0.15s, color 0.15s;
    white-space:   nowrap;
}
 
.fo-btn:hover {
    background: rgba(255, 255, 255, 0.18);
    color:      #fff;
}
 
.fo-btn.is-active {
    background:   rgba(255, 255, 255, 0.22);
    color:        #fff;
    border-color: rgba(255, 255, 255, 0.35);
}
 
.fo-btn-close {
    font-size: 18px;
    padding:   4px 10px;
}
 
/* ── Body: 3 Spalten ──────────────────────────────────────── */
 
.fo-body {
    display:    flex;
    flex:       1;
    overflow:   hidden;
    min-height: 0;
}
 
/* ── Thumbs-Leiste (links) ────────────────────────────────── */
 
#fo-thumbs {
    width:          180px;
    flex-shrink:    0;
    overflow-y:     auto;
    overflow-x:     hidden;
    padding:        10px 8px;
    background:     rgba(0, 0, 0, 0.4);
    border-right:   1px solid rgba(255, 255, 255, 0.07);
    display:        flex;
    flex-direction: column;
    gap:            6px;
    transition:     width 0.25s ease, opacity 0.25s ease;
}
 
#fo-thumbs.is-hidden {
    width:    0;
    padding:  0;
    opacity:  0;
    border:   none;
    overflow: hidden;
}
 
#fo-thumbs img {
    width:         100%;
    aspect-ratio:  1;
    object-fit:    cover;
    border-radius: 5px;
    cursor:        pointer;
    border:        2px solid transparent;
    transition:    border-color 0.15s, transform 0.15s;
}
 
#fo-thumbs img:hover {
    border-color: rgba(255, 255, 255, 0.5);
    transform:    scale(1.03);
}
 
/* ── Meta-Panel (mitte) ───────────────────────────────────── */
 
#fo-meta {
    width:                   320px;
    flex-shrink:             0;
    overflow-y:              auto;
    padding:                 20px 18px;
    background:              rgba(20, 20, 20, 0.7);
    border-right:            1px solid rgba(255, 255, 255, 0.07);
    backdrop-filter:         blur(6px);
    -webkit-backdrop-filter: blur(6px);
    transition:              width 0.25s ease, opacity 0.25s ease;
}
 
#fo-meta.is-hidden {
    width:    0;
    padding:  0;
    opacity:  0;
    border:   none;
    overflow: hidden;
}
 
/* Sterne */
.fo-rating {
    display:     flex;
    align-items: center;
    gap:         2px;
    margin:      0 0 8px 0;
    font-size:   18px;
    line-height: 1;
}
 
.fo-star {
    color: rgba(150, 150, 150, 0.35);
}
 
.fo-star.filled {
    color: #f5b301;
}
 
.fo-rating-number {
    margin-left: 8px;
    font-size:   12px;
    color:       rgba(255, 255, 255, 0.55);
    font-weight: 500;
}
 
/* Titel */
.fo-title {
    margin:      0 0 14px 0;
    font-size:   20px;
    font-weight: 700;
    line-height: 1.25;
    color:       #fff;
    word-break:  break-word;
}
 
/* Meta-Liste */
.fo-meta-list {
    display:               grid;
    grid-template-columns: 110px 1fr;
    gap:                   7px 12px;
    margin:                0 0 16px 0;
    font-size:             13px;
}
 
.fo-meta-list dt {
    color:       rgba(255, 255, 255, 0.55);
    font-weight: 500;
}
 
.fo-meta-list dd {
    margin:     0;
    color:      #ddd;
    word-break: break-word;
}
 
.fo-meta-list dt.fo-meta-section {
    grid-column:    1 / -1;
    color:          rgba(255, 255, 255, 0.35);
    font-size:      11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding-top:    8px;
    border-top:     1px solid rgba(255, 255, 255, 0.08);
    margin-top:     4px;
}
 
/* Info-Text */
.fo-info {
    margin-top:    16px;
    padding:       14px 16px;
    background:    rgba(255, 255, 255, 0.05);
    border:        1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
}
 
.fo-info h3 {
    margin:         0 0 8px 0;
    font-size:      13px;
    font-weight:    600;
    color:          rgba(255, 255, 255, 0.65);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
 
.fo-info-text {
    font-size:   13px;
    line-height: 1.6;
    color:       #ccc;
}
 
/* ── Player (rechts) ─────────────────────────────────────── */
 
.fo-player {
    flex:            1;
    display:         flex;
    align-items:     center;
    justify-content: center;
    padding:         16px;
    min-width:       0;
    overflow:        hidden;
}
 
.fo-player:has(.fo-grid) {
    overflow:  hidden;
    padding:   0;
    display:   block;
}
 
.fo-player-frame {
    position:      relative;
    width:         100%;
    aspect-ratio:  16 / 9;
    max-height:    calc(100vh - 80px);
    background:    #000;
    border-radius: 10px;
    overflow:      hidden;
    box-shadow:    0 8px 32px rgba(0, 0, 0, 0.6);
}
 
.fo-player-iframe {
    position: absolute;
    inset:    0;
    width:    100%;
    height:   100%;
    border:   0;
}
 
/* ── Layout-Varianten ─────────────────────────────────────── */
 
#film-overlay.thumbs-hidden.meta-hidden .fo-player {
    padding: 12px;
}
 
/* ── Lightbox-Trigger ─────────────────────────────────────── */
 
.fo-lightbox-trigger {
    display:        none;
    position:       absolute;
    width:          0;
    height:         0;
    opacity:        0;
    pointer-events: none;
}
 
/* ── Vollbild ─────────────────────────────────────────────── */
 
#film-overlay.is-fullscreen .fo-player-frame {
    border-radius: 0;
    box-shadow:    none;
}
 
/* ── Poster + Abspielen-Button im Meta-Panel ──────────────── */
 
.fo-meta-poster {
    display:       block;
    width:         100%;
    max-width:     200px;
    margin:        0 auto 14px auto;
    border-radius: 8px;
    object-fit:    cover;
    box-shadow:    0 4px 16px rgba(0, 0, 0, 0.5);
}
 
.fo-meta-play-btn {
    display:        block;
    width:          100%;
    padding:        12px 0;
    margin-bottom:  16px;
    background:     #e50914;
    color:          #fff;
    border:         none;
    border-radius:  8px;
    font-size:      16px;
    font-weight:    600;
    cursor:         pointer;
    letter-spacing: 0.03em;
    transition:     background 0.2s;
}
 
.fo-meta-play-btn:hover {
    background: #c40812;
}
 
/* back.jpg im Player-Bereich */
.fo-back-img-wrap {
    width:           100%;
    height:          100%;
    display:         flex;
    align-items:     center;
    justify-content: center;
}
 
.fo-back-img {
    max-width:     100%;
    max-height:    100%;
    object-fit:    contain;
    border-radius: 10px;
    cursor:        pointer;
    box-shadow:    0 8px 32px rgba(0, 0, 0, 0.6);
    transition:    transform 0.2s;
}
 
.fo-back-img:hover {
    transform: scale(1.01);
}
 
/* ── Mobile (Safari-Fix) ──────────────────────────────────── */
 
@media (max-width: 900px) {
    .fo-body {
        flex-direction: column;
        overflow-y:     auto;
        height:         100%;
    }
 
    #fo-thumbs {
        width:          100%;
        flex-direction: row;
        overflow-x:     auto;
        overflow-y:     hidden;
        height:         110px;
        flex-shrink:    0;
        border-right:   none;
        border-bottom:  1px solid rgba(255, 255, 255, 0.07);
        padding:        8px;
    }
 
    #fo-thumbs img {
        width:       70px;
        flex-shrink: 0;
    }
 
    #fo-thumbs.is-hidden {
        width:   100%;
        height:  0;
        padding: 0;
    }
 
    #fo-meta {
        width:        100%;
        flex-shrink:  0;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.07);
        max-height:   none;
    }
 
    #fo-meta.is-hidden {
        width:  100%;
        height: 0;
    }
 
    .fo-player {
        width:       100%;
        flex-shrink: 0;
        height:      320px;
        min-height:  320px;
        padding:     10px;
    }
 
    .fo-player-frame {
        max-height: none;
        height:     100%;
    }
 
    .fo-back-img-wrap {
        width:      100%;
        height:     300px;
        min-height: 300px;
    }
 
    .fo-back-img {
        width:      100%;
        height:     300px;
        object-fit: cover;
        max-height: none;
    }
 
    .fo-meta-play-btn {
        font-size: 17px;
        padding:   13px 0;
    }
}
 
/* Bild-Lightbox ueber dem Film-Overlay */
#gallery-lightbox {
    z-index: 1100;
}
/* ── Bilder-Grid rechts (Masonry, analog bo-img-grid) ── */
 
.fo-grid {
    width:      100%;
    height:     100%;
    overflow-y: auto;
    overflow-x: hidden;
    padding:    16px;
    box-sizing: border-box;
}
 
.fo-img-grid {
    display:               grid;
    grid-template-columns: repeat(3, 1fr);
    gap:                   10px;
}
 
@media (max-width: 1100px) { .fo-img-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width:  700px) { .fo-img-grid { grid-template-columns: repeat(1, 1fr); } }
 
.fo-grid-item {
    border-radius: 8px;
    overflow:      hidden;
    cursor:        pointer;
    position:      relative;
    aspect-ratio:  3 / 2;
    background:    #000;
    transition:    transform 0.15s, box-shadow 0.15s;
}
 
.fo-grid-item:hover {
    transform:  scale(1.01);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
}
 
.fo-grid-item img {
    display:    block;
    width:      100%;
    height:     100%;
    object-fit: contain;
}
 
@media (max-width: 900px) {
    .fo-grid {
        padding: 10px;
    }
    .fo-img-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
/* - Share-Info (Geteilt mit) - */
 
.fo-share-info {
    margin-top: 12px;
    font-size:  12px;
    color:      rgba(255, 255, 255, 0.7);
}
 
.fo-share-title {
    font-size:      11px;
    color:          rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom:  6px;
    padding-top:    10px;
    border-top:     1px solid rgba(255, 255, 255, 0.08);
}
 
.fo-share-row {
    display:     flex;
    align-items: center;
    gap:         8px;
    padding:     4px 0;
    flex-wrap:   nowrap;
}
 
.fo-share-user {
    font-weight: 600;
    color:       #fff;
    min-width:   60px;
    flex-shrink: 0;
}
 
.fo-share-path {
    flex:          1;
    color:         rgba(255, 255, 255, 0.45);
    font-size:     11px;
    overflow:      hidden;
    text-overflow: ellipsis;
    white-space:   nowrap;
}
 
.fo-share-revoke {
    background:    rgba(220, 38, 38, 0.15);
    border:        1px solid rgba(220, 38, 38, 0.4);
    color:         rgba(255, 120, 120, 0.9);
    border-radius: 6px;
    font-size:     11px;
    padding:       3px 8px;
    cursor:        pointer;
    white-space:   nowrap;
    flex-shrink:   0;
    transition:    background 0.15s;
}
 
.fo-share-revoke:hover    { background: rgba(220, 38, 38, 0.3); }
.fo-share-revoke:disabled { opacity: 0.5; cursor: not-allowed; }
 