/* CSS */
.atrfm-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999999999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.atrfm-modal.active {
    display: block;
}

.atrfm-modal.show {
    opacity: 1;
}

.atrfm-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
}

.atrfm-modal-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.atrfm-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    z-index: 10001;
    transition: background 0.3s ease;
    pointer-events: auto;
}

.atrfm-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.atrfm-modal-image-container {
    max-width: 90%;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.atrfm-modal-image {
    max-width: 100%;
    max-height: 90vh;
    width: auto;
    height: auto;
    object-fit: contain;
    user-select: none;
    pointer-events: auto;
}

.atrfm-modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: #01653796;
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    pointer-events: auto;
}

.atrfm-modal-nav:hover {
    background: rgba(255, 255, 255, 0.2);
}

.atrfm-modal-nav.hidden {
    opacity: 0;
    pointer-events: none;
}

.atrfm-modal-prev {
    left: 20px;
}

.atrfm-modal-next {
    right: 20px;
}

.atrfm-modal-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 16px;
    background: rgba(0, 0, 0, 0.5);
    padding: 8px 16px;
    border-radius: 20px;
}

/* Responsivo */
@media (max-width: 768px) {
    .atrfm-modal-nav {
        width: 40px;
        height: 40px;
    }
    
    .atrfm-modal-prev {
        left: 10px;
    }
    
    .atrfm-modal-next {
        right: 10px;
    }
    
    .atrfm-modal-close {
        top: 10px;
        right: 10px;
        width: 35px;
        height: 35px;
        font-size: 28px;
    }
}