﻿/* Image Preview Modal - see Scripts/common/image-preview.js.
   Shows the image at its natural size, shrunk only to fit the viewport. */
.image-preview-modal {
    position: fixed;
    inset: 0;
    z-index: 10010;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: var(--modal-overlay-bg, rgba(0, 0, 0, 0.75));
    -webkit-backdrop-filter: var(--modal-overlay-blur, blur(4px));
    backdrop-filter: var(--modal-overlay-blur, blur(4px));
}
.image-preview-modal.is-open { display: flex; }

.image-preview-modal__image {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.5);
}

.image-preview-modal__close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 18px;
    cursor: pointer;
}
.image-preview-modal__close:hover { background: rgba(0, 0, 0, 0.8); }
.image-preview-modal__close:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* Opted-in images look clickable. */
img.tournament-image,
.tournament-image img,
.tournament-row-thumb-v3 img,
.td-event-poster img { cursor: zoom-in; }
