/**
 * Popup Redirect Countdown — Frontend Styles
 *
 * @author Baris Ozyurt <mirket@mirket.io>
 * @license GPL-3.0
 */

/* Overlay container */
.prc-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.prc-overlay--visible {
    opacity: 1;
    visibility: visible;
}

/* Dark backdrop */
.prc-overlay__backdrop {
    position: absolute;
    inset: 0;
    background: #000;
    opacity: 0.7; /* overridden by JS */
}

/* Content wrapper */
.prc-overlay__content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 90%;
    max-height: 85vh;
}

/* Close button */
.prc-overlay__close {
    position: absolute;
    top: -16px;
    right: -16px;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.2s ease;
    z-index: 2;
}

.prc-overlay__close:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

/* Image */
.prc-overlay__image {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 4px;
    animation: prc-image-pop 0.4s ease 0.1s both;
}

@keyframes prc-image-pop {
    0% {
        transform: scale(0.9);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Countdown text */
.prc-overlay__countdown {
    position: relative;
    z-index: 1;
    margin-top: 16px;
    color: #fff;
    font-size: 16px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    text-align: center;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

/* Progress bar */
.prc-overlay__progress-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    z-index: 1;
}

.prc-overlay__progress-fill {
    height: 100%;
    width: 100%;
    background: #fff;
    transition: width linear;
}
