/* Responsive Image Modal CSS - Fits Image Size */
.askre-image-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(5px);
}

.askre-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: inline-block;
    max-width: 95vw;
    max-height: 90vh;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.8);
}

.askre-modal-content img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 12px;
    background-color: transparent;
}

.askre-modal-close {
    position: fixed;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10001;
    background: rgba(0, 0, 0, 0.7);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.askre-modal-close:hover {
    background: rgba(255, 90, 95, 0.9);
    border-color: rgba(255, 255, 255, 0.4);
    transform: scale(1.1);
}

.askre-modal-prev,
.askre-modal-next {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 50%;
    width: 55px;
    height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.2);
    z-index: 10001;
}

.askre-modal-prev {
    left: 30px;
}

.askre-modal-next {
    right: 30px;
}

.askre-modal-prev:hover,
.askre-modal-next:hover {
    background: rgba(255, 90, 95, 0.9);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-50%) scale(1.1);
}

.askre-modal-counter {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    border: 2px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    z-index: 10001;
    font-family: 'Poppins', Arial, sans-serif;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .askre-modal-content {
        max-width: 95vw;
        max-height: 85vh;
        border-radius: 8px;
    }
    
    .askre-modal-content img {
        border-radius: 8px;
    }
    
    .askre-modal-close {
        top: 15px;
        right: 15px;
        width: 45px;
        height: 45px;
        font-size: 28px;
    }
    
    .askre-modal-prev,
    .askre-modal-next {
        width: 50px;
        height: 50px;
        font-size: 18px;
    }
    
    .askre-modal-prev {
        left: 15px;
    }
    
    .askre-modal-next {
        right: 15px;
    }
    
    .askre-modal-counter {
        bottom: 20px;
        padding: 10px 20px;
        font-size: 13px;
    }
}

@media (max-width: 576px) {
    .askre-modal-content {
        max-width: 98vw;
        max-height: 80vh;
        border-radius: 6px;
    }
    
    .askre-modal-content img {
        border-radius: 6px;
    }
    
    .askre-modal-close {
        top: 12px;
        right: 12px;
        width: 42px;
        height: 42px;
        font-size: 25px;
    }
    
    .askre-modal-prev,
    .askre-modal-next {
        width: 45px;
        height: 45px;
        font-size: 16px;
    }
    
    .askre-modal-prev {
        left: 12px;
    }
    
    .askre-modal-next {
        right: 12px;
    }
    
    .askre-modal-counter {
        bottom: 15px;
        padding: 8px 16px;
        font-size: 12px;
    }
}

/* For very wide images */
@media (min-aspect-ratio: 2/1) {
    .askre-modal-content {
        max-width: 90vw;
        max-height: 70vh;
    }
}

/* For very tall images */
@media (max-aspect-ratio: 3/4) {
    .askre-modal-content {
        max-width: 80vw;
        max-height: 85vh;
    }
}

/* Animation for smooth opening */
.askre-image-modal.show {
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        backdrop-filter: blur(0px);
    }
    to {
        opacity: 1;
        backdrop-filter: blur(5px);
    }
}