/* MasterBinder 0.0.8 — immagini reali, cache e zoom */

.card-preview-zoom,
.binder-card-image-shell {
    font: inherit;
    color: inherit;
    border: 0;
    margin: 0;
    cursor: zoom-in;
}

.card-preview-zoom {
    padding: 0;
    background: transparent;
    border-radius: 10px;
    outline: none;
}

.card-preview-zoom:not(:disabled):hover #cardPreviewImage {
    transform: scale(1.012);
    filter: drop-shadow(0 17px 25px rgba(0,0,0,.40));
}

.card-preview-zoom:focus-visible {
    box-shadow: 0 0 0 3px rgba(109,155,234,.34);
}

.card-preview-zoom:disabled {
    cursor: default;
}

#cardPreviewImage {
    transition: transform .13s ease, filter .13s ease;
}

.admin-image-refresh {
    margin-top: 10px;
}

.image-refresh-status {
    width: 100%;
    margin-top: 7px;
    color: #aebbd0;
    font-size: 11px;
    line-height: 1.35;
}

.binder-card-image-shell {
    width: 100%;
    background: #0e1522;
}

.binder-card-image-shell:disabled {
    cursor: default;
}

.binder-card-image-shell:not(:disabled):hover img {
    transform: scale(1.018);
}

.binder-card-image-shell img {
    transition: transform .13s ease;
}

body.zoom-open {
    overflow: hidden;
}

.card-zoom-modal[hidden] {
    display: none !important;
}

.card-zoom-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: grid;
    place-items: center;
    padding: 24px;
}

.card-zoom-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    background: rgba(4,8,16,.88);
    cursor: zoom-out;
}

.card-zoom-dialog {
    width: min(92vw, 720px);
    height: min(94vh, 980px);
    position: relative;
    z-index: 1;
    padding: 44px 18px 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 1px solid #3d4b67;
    border-radius: 14px;
    background: #101725;
    box-shadow: 0 28px 90px rgba(0,0,0,.65);
}

.card-zoom-dialog img {
    flex: 1;
    min-height: 0;
    max-width: 100%;
    max-height: calc(100% - 34px);
    object-fit: contain;
    border-radius: 11px;
    filter: drop-shadow(0 18px 28px rgba(0,0,0,.45));
}

.card-zoom-title {
    width: calc(100% - 58px);
    min-height: 24px;
    position: absolute;
    top: 12px;
    left: 18px;
    overflow: hidden;
    color: #e8eef8;
    font-size: 14px;
    font-weight: 750;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-zoom-close {
    width: 34px;
    height: 34px;
    position: absolute;
    z-index: 2;
    top: 8px;
    right: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #dce6f7;
    border: 1px solid #50617e;
    border-radius: 50%;
    background: #1b263a;
    cursor: pointer;
    font-size: 25px;
    line-height: 1;
}

.card-zoom-close:hover {
    background: #2a3852;
}

@media (max-width: 760px) {
    .card-zoom-modal { padding: 8px; }
    .card-zoom-dialog {
        width: 100%;
        height: 96vh;
        padding-left: 8px;
        padding-right: 8px;
    }
}
