/* marchenkov.modal — modal overlay styles */

/* ---- Scroll-lock ---- */
body.marchenkov-modal-open {
    overflow: hidden;
}

/* ---- Image-trigger affordance ---- */
[data-modal-image] {
    cursor: zoom-in;
}

/* ---- Root: hidden by default ---- */
.marchenkov-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: none;
}

/* ---- Open modifier ---- */
.marchenkov-modal--open {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: marchenkov-modal-fadein 0.2s ease;
}

@keyframes marchenkov-modal-fadein {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ---- Backdrop ---- */
.marchenkov-modal__backdrop {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.85);
    cursor: default;
}

/* ---- Content container ---- */
.marchenkov-modal__content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    z-index: 1;
}

/* ---- Print button ---- */
.marchenkov-modal__print {
    position: absolute;
    top: 12px;
    right: 60px;
    z-index: 10002;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 6px;
    border-radius: 4px;
    transition: background 0.2s, color 0.2s;
    min-width: 38px;
    min-height: 38px;
}

.marchenkov-modal__print svg {
    width: 20px;
    height: 20px;
    display: block;
}

.marchenkov-modal__print:hover {
    background: rgba(0, 0, 0, 0.9);
    color: var(--currentDarkBlue, #69c6ec);
}

/* ---- Close button ---- */
.marchenkov-modal__close {
    position: absolute;
    top: 12px;
    right: 16px;
    z-index: 10002;
    background: rgba(0, 0, 0, 0.6);
    border: none;
    color: #fff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    padding: 4px 10px 6px;
    border-radius: 4px;
    transition: background 0.2s, color 0.2s;
    min-width: 32px;
    min-height: 32px;
}

.marchenkov-modal__close:hover {
    background: rgba(0, 0, 0, 0.9);
    color: var(--currentDarkBlue, #69c6ec);
}

/* ---- Image ---- */
.marchenkov-modal__image {
    display: block;
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
}
