/**
 * /assets/css/group-img-modal.css
 *
 * Purpose:  Lightbox-Modal fuer Timeline-Bilder (group-img-modal.js)
 * Deps:     app.css
 * Load:     index.php
 * Version:  1.0.0
 */

/* =========================
   Base: Versteckt bis .open
   ========================= */
.img-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10070;
    align-items: center;
    justify-content: center;
}

.img-modal.open {
    display: flex;
}

/* =========================
   Backdrop (dunkler Hintergrund)
   ========================= */
.img-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(4px);
    cursor: pointer;
}

/* =========================
   Body (Bild-Container)
   ========================= */
.img-modal-body {
    position: relative;
    z-index: 1;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* =========================
   Bild
   ========================= */
.img-modal-img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
    user-select: none;
}

/* =========================
   Close-Button (×)
   ========================= */
.img-modal-close {
    position: absolute;
    top: -40px;
    right: -8px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: #fff;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    padding: 0;
}

.img-modal-close:hover {
    background: rgba(255, 107, 107, 0.3);
    border-color: rgba(255, 107, 107, 0.5);
    transform: scale(1.1);
}

/* =========================
   Animation
   ========================= */
.img-modal.open .img-modal-backdrop {
    animation: imgModalFadeIn 0.2s ease;
}

.img-modal.open .img-modal-body {
    animation: imgModalZoomIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes imgModalFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes imgModalZoomIn {
    from { opacity: 0; transform: scale(0.9); }
    to   { opacity: 1; transform: scale(1); }
}

/* =========================
   Responsive
   ========================= */
@media (max-width: 576px) {
    .img-modal-img {
        max-width: 95vw;
        max-height: 80vh;
        border-radius: 4px;
    }

    .img-modal-close {
        top: -36px;
        right: 0;
    }
}
