/* =======================
   zoom.css
   ======================= */

/* ========== Thumbnails in Modal ========== */
.zoom-thumbnails {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin: 1rem 0;
}

.zoom-thumbnails img.zoom-thumbnail {
    display: block;
    width: 60px;
    height: 60px;
    object-fit: cover;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 6px;
    transition:
        border-color 0.25s ease,
        box-shadow 0.25s ease,
        transform 0.25s ease;
}

.zoom-thumbnails img.zoom-thumbnail:hover {
    border-color: #007bff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.zoom-thumbnails img.zoom-thumbnail.active-thumbnail {
    border-color: #007bff;
    box-shadow: 0 0 8px rgba(0, 123, 255, 0.4);
}

/* ========== Modal Backdrop (Bootstrap) ========== */
/* Płynniejsza, ciemna animacja wejścia/wyjścia. */
.modal-backdrop {
    transition: background-color 0.35s ease, opacity 0.35s ease;
}

.modal-backdrop.show {
    background-color: rgba(0, 0, 0, 0.9) !important;
    /* Bardzo ciemne tło */
    opacity: 1;
}

/* ========== Keyframes for Softer Zoom Animation ========== */
@keyframes modal-zoom-fade-in {
    0% {
        transform: translateY(20px) scale(0.8);
        opacity: 0;
    }

    100% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

/* ========== Modal Zoom Animation ========== */
/* .fade i .show to klasy Bootstrapa, 
   ale podmieniamy transition na naszą animację. */
.modal.fade .modal-dialog {
    opacity: 0;
    transform: scale(0.8);
    transition: none;
    /* Wyłączamy wbudowane transition Bootstrapa */
}

/* Gdy modal jest widoczny, włączamy naszą delikatniejszą animację. */
.modal.fade.show .modal-dialog {
    animation: modal-zoom-fade-in 0.4s ease-out forwards;
    /* Większy czas i łagodna funkcja easing zapewniają spokojny efekt. */
}

/* ========== Modal Content Styling ========== */
#image-zoom-modal .modal-content {
    background-color: #fff;
    border: none;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
}

#image-zoom-modal .modal-header {
    border-bottom: none;
}

#image-zoom-modal .zoom-close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

#image-zoom-modal .zoom-close-btn:hover {
    color: #007bff;
}

/* ========== Thank You Popup ========== */
.thank-you-popup {
    position: fixed;
    top: 20%;
    left: 50%;
    transform: translate(-50%, -20%);
    background-color: rgba(0, 0, 0, 0.95);
    color: #fff;
    padding: 20px 30px;
    border-radius: 10px;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.4s ease,
        transform 0.4s ease;
}

.thank-you-popup.show {
    opacity: 1;
    transform: translate(-50%, -20%) scale(1.02);
}

.thank-you-popup-content {
    text-align: center;
}