/* ==================================
   VISUALIZADOR DE CATÁLOGO PDF - PREMIUM
   ================================== */

/* Modal Customizado */
#catalogViewerModal .modal-content {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 1px solid rgba(255, 193, 7, 0.2);
}

#catalogViewerModal .modal-header {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 193, 7, 0.3);
    padding: 1rem 1.5rem;
}

#catalogViewerModal .modal-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 600;
}

/* Estatísticas do Catálogo */
.catalog-stats {
    padding: 0.5rem 1rem;
    background: rgba(255, 193, 7, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(255, 193, 7, 0.2);
}

.catalog-stats span {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
}

/* Barra de Ferramentas do PDF */
.pdf-toolbar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 193, 7, 0.2);
}

.toolbar-section {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.toolbar-btn {
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.3);
    color: #ffc107;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Exo Demi', 'Exo', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    text-decoration: none;
}

.toolbar-btn:hover {
    background: rgba(255, 193, 7, 0.2);
    border-color: #ffc107;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3);
}

.toolbar-btn:active {
    transform: translateY(0);
}

.toolbar-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.toolbar-btn:disabled:hover {
    transform: none;
    box-shadow: none;
}

/* Informação de Página */
.page-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: 8px;
}

.page-input {
    width: 60px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 193, 7, 0.3);
    color: #ffc107;
    text-align: center;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
}

.page-input:focus {
    outline: none;
    border-color: #ffc107;
    box-shadow: 0 0 0 2px rgba(255, 193, 7, 0.2);
}

/* Selector de Zoom */
.zoom-select {
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.3);
    color: #ffc107;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    transition: all 0.3s ease;
}

.zoom-select:hover {
    background: rgba(255, 193, 7, 0.2);
    border-color: #ffc107;
}

.zoom-select:focus {
    outline: none;
    border-color: #ffc107;
    box-shadow: 0 0 0 2px rgba(255, 193, 7, 0.2);
}

/* Container do PDF */
.pdf-container {
    position: relative;
    width: 100%;
    height: calc(100vh - 150px);
    overflow: auto;
    background: linear-gradient(135deg, #0f0f1e 0%, #1a1a2e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.pdf-container::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

.pdf-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
}

.pdf-container::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
    border-radius: 6px;
    border: 2px solid rgba(0, 0, 0, 0.2);
}

.pdf-container::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #ffcd38 0%, #ffa726 100%);
}

/* Canvas do PDF */
#pdfCanvas {
    max-width: 100%;
    height: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    border-radius: 8px;
    border: 1px solid rgba(255, 193, 7, 0.2);
    background: white;
}

/* Loading */
.pdf-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 10;
}

.pdf-loading .spinner-border {
    width: 3rem;
    height: 3rem;
    border-width: 0.3rem;
}

.pdf-loading p {
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
    font-weight: 500;
}

/* Responsividade Mobile */
@media (max-width: 768px) {
    .pdf-toolbar {
        flex-direction: column;
        gap: 0.5rem;
        padding: 0.75rem;
    }

    .toolbar-section {
        width: 100%;
        justify-content: center;
    }

    .toolbar-btn {
        padding: 0.5rem;
        font-size: 0.9rem;
        min-width: 36px;
    }

    .page-info {
        flex-grow: 1;
        justify-content: center;
    }

    .zoom-select {
        flex-grow: 1;
    }

    .pdf-container {
        height: calc(100vh - 200px);
        padding: 1rem;
    }

    #catalogViewerModal .modal-title {
        font-size: 1.2rem;
    }
    
    #catalogViewerModal .modal-header {
        padding: 0.75rem 1rem;
    }
}

/* Animações */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#pdfCanvas {
    animation: fadeIn 0.5s ease-out;
}

/* Modo Fullscreen */
.pdf-container.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    padding: 1rem;
}

.pdf-container.fullscreen #pdfCanvas {
    max-height: calc(100vh - 2rem);
}
