/* Modal de Ampliação do PDF */
.pdf-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.pdf-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    cursor: pointer;
}

.pdf-modal-content {
    position: relative;
    width: 98%;
    max-width: 1600px;
    height: 100vh;
    max-height: 100vh;
    background-color: #1a1a1a;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    z-index: 10001;
    animation: slideUp 0.3s ease;
    overflow: hidden;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.pdf-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10002;
}

.pdf-modal-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.pdf-modal-navigation {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    gap: 20px;
    position: relative;
}

.pdf-modal-container {
    flex: 1;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    overflow: auto;
    max-height: calc(100vh - 1px);
    min-height: calc(100vh - 1px);
    padding: 10px;
    width: 100%;
    box-sizing: border-box;
}

#pdf-canvas-modal {
    max-width: 100%;
    width: auto;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    background-color: #fff;
    display: block;
    margin: 0 auto;
}

.pdf-modal-nav-btn {
    width: 50px;
    height: 50px;
    background-color: rgba(246, 231, 5, 0.2);
    border: 2px solid #f6e705;
    border-radius: 50%;
    color: #f6e705;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.pdf-modal-nav-btn:hover {
    background-color: rgba(246, 231, 5, 0.3);
    transform: scale(1.1);
}

.pdf-modal-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: none;
}

.pdf-modal-counter {
    position: absolute;
    left: 20px;  
    background-color: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: bold;
    z-index: 10002;
}

/* Para telas maiores (notebooks e desktops), manter no topo */
@media (min-width: 769px) {
    .pdf-modal-content {
        width: 100%;
        border-radius: 0;
    }
}

/* Responsividade */
@media (max-width: 768px) {
    .pdf-modal-content {
        width: 100%;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
        padding: 8px;
    }
    
    .pdf-modal-container {
        max-height: calc(100vh - 100px);
        min-height: calc(100vh - 100px);
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 5px;
    }
    
    .pdf-modal-navigation {
        gap: 10px;
    }
    
    .pdf-modal-nav-btn {
        width: 40px;
        height: 40px;
        font-size: 18px;
        flex-shrink: 0;
    }
    
    .pdf-modal-close {
        width: 35px;
        height: 35px;
        font-size: 18px;
        top: 8px;
        right: 8px;
    }
    
    .pdf-modal-counter {
        top: auto;
        font-size: 12px;
        padding: 6px 12px;
        bottom: 80px;
        left: auto;
    }
    
    #pdf-canvas-modal {
        max-width: 100%;
        height: auto;
    }
}

@media (max-width: 480px) {
    .pdf-modal-content {
        padding: 5px;
    }
    
    .pdf-modal-container {
        max-height: calc(100vh - 90px);
        min-height: calc(100vh - 90px);
        padding: 3px;
    }
    
    .pdf-modal-nav-btn {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
    
    .pdf-modal-navigation {
        gap: 5px;
    }
}
