/* ===================================================================
   GLOBAL MODAL (modal.css)
   Sauber, konfliktfrei, funktioniert auf ALLEN Seiten
=================================================================== */

/* --- Grund-Container ------------------------------------------------ */

.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);

    display: flex;
    justify-content: center;
    align-items: center;

    padding: 24px;

    opacity: 0;
    visibility: hidden;

    transition: opacity 0.25s ease, visibility 0.25s ease;
    z-index: 9999;
}

/* --- Sichtbar-Zustand ---------------------------------------------- */

.modal.show {
    opacity: 1;
    visibility: visible;
}

/* --- Bild ----------------------------------------------------------- */

.modal-content {
    display: block;
    max-width: 95%;
    max-height: 90vh;

    border-radius: 12px;
    background: #000;

    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);

    transform: scale(0.95);
    opacity: 0;

    transition: transform 0.25s ease, opacity 0.25s ease;
}

/* Animation nur im sichtbaren Zustand */
.modal.show .modal-content {
    transform: scale(1);
    opacity: 1;
}

/* --- Close Button --------------------------------------------------- */

.modal-close {
    position: absolute;
    top: 24px;
    right: 24px;

    font-size: 2rem;
    line-height: 1;

    color: #fff;
    cursor: pointer;

    padding: 4px 10px;
    border-radius: 8px;

    background: rgba(0, 0, 0, 0.4);

    transition: background 0.2s ease, transform 0.2s ease;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.6);
    transform: scale(1.08);
}

.modal-close:active {
    transform: scale(0.95);
}

/* ===================================================================
   RESPONSIVE
=================================================================== */

@media (max-width: 768px) {
    .modal-content {
        max-width: 100%;
        max-height: 80vh;
        border-radius: 10px;
    }

    .modal-close {
        top: 16px;
        right: 16px;
        font-size: 1.6rem;
    }
}