/* Estilos para o campo de upload de PDF */
.gutenverse-pdf-upload-container {
    margin-bottom: 1rem;
}

.pdf-upload-wrapper {
    position: relative;
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    background: #fafafa;
    transition: all 0.3s ease;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.pdf-upload-wrapper:hover {
    border-color: #007cba;
    background: #ffffff;
}

.pdf-upload-wrapper.drag-over {
    border-color: #007cba;
    background: #e6f3ff;
    transform: scale(1.02);
}

.gutenverse-pdf-upload {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    z-index: 2;
}

.custom-file-input {
    position: relative;
    width: 100%;
}

.file-input-label {
    display: inline-block;
    padding: 10px 20px;
    background: #007cba;
    color: white;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease;
    font-weight: 500;
}

.file-input-label:hover {
    background: #005a87;
}

.file-input-preview {
    margin-top: 10px;
    font-size: 0.9em;
    color: #666;
}

.selected-file {
    color: #007cba;
    font-weight: 500;
}

/* Barra de progresso */
.upload-progress {
    margin-top: 15px;
    width: 100%;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #007cba, #005a87);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 4px;
}

.progress-text {
    font-size: 0.85em;
    color: #666;
}

/* Status do upload */
.upload-status {
    margin-top: 10px;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.9em;
    font-weight: 500;
}

.upload-status.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.upload-status.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.upload-status.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Arquivo enviado */
.uploaded-file {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #e8f5e8;
    border: 1px solid #c3e6cb;
    border-radius: 4px;
    padding: 10px 15px;
    margin-top: 10px;
    max-width: 100%;
}

.file-name {
    flex: 1;
    color: #155724;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-right: 10px;
}

.remove-file {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.remove-file:hover {
    background: #c82333;
}

/* Ícone de upload */
.pdf-upload-wrapper::before {
    content: "📄";
    font-size: 2em;
    margin-bottom: 10px;
    display: block;
}

/* Responsividade */
@media (max-width: 768px) {
    .pdf-upload-wrapper {
        padding: 15px;
        min-height: 100px;
    }
    
    .file-input-label {
        padding: 8px 16px;
        font-size: 0.9em;
    }
    
    .uploaded-file {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .file-name {
        margin-right: 0;
        margin-bottom: 5px;
    }
}

/* Animações */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.uploaded-file {
    animation: fadeIn 0.3s ease;
}

/* Estados de foco para acessibilidade */
.gutenverse-pdf-upload:focus + .file-input-label {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* Estilo para formulários Bootstrap */
.form-group .gutenverse-pdf-upload-container {
    margin-bottom: 0;
}

.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #333;
}

.form-text {
    font-size: 0.875em;
    color: #6c757d;
    margin-top: 0.25rem;
}

/* Integração com temas escuros */
@media (prefers-color-scheme: dark) {
    .pdf-upload-wrapper {
        background: #ffffff;
        border-color: #4a5568;
        color: #e2e8f0;
    }
    
    .pdf-upload-wrapper:hover {
        background: #cfd0d1;
        border-color: #b8bcbe;
    }
    
    .upload-status.success {
        background: #22543d;
        color: #9ae6b4;
        border-color: #38a169;
    }
    
    .upload-status.error {
        background: #742a2a;
        color: #feb2b2;
        border-color: #e53e3e;
    }
    
    .uploaded-file {
        background: #22543d;
        border-color: #38a169;
    }
    
    .file-name {
        color: #9ae6b4;
    }
}

/* Melhorias de acessibilidade */
.gutenverse-pdf-upload-container:focus-within {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* Indicador de carregamento */
.upload-progress .progress-fill {
    background: linear-gradient(90deg, #007cba, #005a87);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
    100% {
        opacity: 1;
    }
}

/* Tooltip para arquivos grandes */
.file-name[title] {
    cursor: help;
}

/* Estilo para múltiplos arquivos (futuro) */
.multiple-files {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.file-item {
    background: #e8f5e8;
    border: 1px solid #c3e6cb;
    border-radius: 4px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9em;
}

.file-item .remove-file {
    width: 20px;
    height: 20px;
    font-size: 14px;
} 