/* 
* LikePDF.com - Estilos do Conversor
* Versão: 1.0.0
*/

/* Container do conversor */
.converter-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    background-color: var(--light);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
}

/* Área de upload */
.upload-area {
    border: 2px dashed #ccc;
    padding: 2.5rem;
    text-align: center;
    border-radius: var(--border-radius);
    background-color: white;
    transition: all 0.3s;
    margin-bottom: 1.5rem;
    cursor: pointer;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: var(--primary);
    background-color: #f0f7ff;
}

.upload-icon {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.upload-text {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.file-input {
    display: none;
}

.upload-btn {
    background-color: var(--light);
    color: var(--dark);
    border: 1px solid #ccc;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.3s;
    display: inline-block;
}

.upload-btn:hover {
    background-color: #e9ecef;
}

/* Indicador de progresso */
.progress-container {
    margin-bottom: 1.5rem;
    display: none; /* Inicialmente oculto */
}

.progress-bar {
    height: 10px;
    background-color: #e9ecef;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background-color: var(--primary);
    width: 0; /* Inicialmente 0% */
    transition: width 0.3s;
}

.progress-text {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Configurações de conversão */
.settings-container {
    margin-bottom: 1.5rem;
}

.settings-title {
    margin-bottom: 0.75rem;
    color: var(--dark);
    font-weight: 600;
}

.settings-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.option-card {
    flex: 1;
    min-width: 150px;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.option-card:hover {
    border-color: var(--primary);
    background-color: #f0f7ff;
}

.option-card.active {
    border-color: var(--primary);
    background-color: #f0f7ff;
}

.option-card h4 {
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.option-card p {
    margin-bottom: 0;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Configurações adicionais */
.additional-settings {
    margin-bottom: 1.5rem;
}

.setting-group {
    margin-bottom: 1rem;
}

.setting-group:last-child {
    margin-bottom: 0;
}

.setting-label {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.setting-label input[type="checkbox"] {
    margin-right: 0.5rem;
}

/* Botão de conversão */
.convert-btn {
    padding: 0.875rem;
    font-size: 1.125rem;
    width: 100%;
    margin-bottom: 1rem;
}

/* Área de visualização de arquivos */
.file-preview {
    display: none; /* Inicialmente oculto */
    margin-bottom: 1.5rem;
}

.file-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.file-preview-title {
    font-weight: 600;
    color: var(--dark);
}

.file-info {
    display: flex;
    background-color: white;
    border-radius: var(--border-radius);
    padding: 1rem;
    align-items: center;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
}

.file-icon {
    font-size: 2rem;
    margin-right: 1rem;
    color: var(--primary);
}

.file-details {
    flex-grow: 1;
}

.file-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
    word-break: break-all;
}

.file-meta {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.file-actions {
    display: flex;
    gap: 0.5rem;
}

.file-actions button {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

/* Múltiplos arquivos */
.file-list {
    max-height: 400px;
    overflow-y: auto;
}

.file-item {
    display: flex;
    background-color: white;
    border-radius: var(--border-radius);
    padding: 0.75rem;
    align-items: center;
    margin-bottom: 0.5rem;
    box-shadow: var(--shadow-sm);
}

.file-item .file-icon {
    font-size: 1.5rem;
    margin-right: 0.75rem;
}

.file-item .file-details {
    flex-grow: 1;
}

.file-item .file-name {
    font-size: 0.9375rem;
}

.file-item .file-actions {
    flex-shrink: 0;
}

/* Resultado da conversão */
.result-container {
    display: none; /* Inicialmente oculto */
    text-align: center;
    padding: 2rem;
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
}

.result-icon {
    font-size: 3rem;
    color: var(--success);
    margin-bottom: 1rem;
}

.result-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.result-message {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.download-btn {
    background-color: var(--success);
}

.download-btn:hover {
    background-color: #059669;
}

/* Arrastar e soltar arquivo na área de visualização de imagem */
.image-preview-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.image-preview-item {
    position: relative;
    width: 100px;
    height: 100px;
    overflow: hidden;
    border-radius: var(--border-radius);
    border: 1px solid #ddd;
}

.image-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-preview-item .remove-btn {
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    background-color: rgba(255, 0, 0, 0.7);
    color: white;
    border: none;
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.75rem;
    cursor: pointer;
}

.drag-handle {
    position: absolute;
    bottom: 0.25rem;
    left: 0.25rem;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: move;
}

/* Estilos específicos para diferentes conversores */

/* PDF para Word */
.pdf-to-word .upload-icon {
    color: #185ABC;
}

/* JPG para PDF */
.jpg-to-pdf .upload-icon {
    color: #E91E63;
}

/* Word para PDF */
.word-to-pdf .upload-icon {
    color: #2B579A;
}

/* PDF para JPG */
.pdf-to-jpg .upload-icon {
    color: #FF5722;
}

/* Estados de erro */
.error-state {
    text-align: center;
    padding: 2rem;
    background-color: #fef2f2;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--danger);
    margin-bottom: 1.5rem;
}

.error-icon {
    font-size: 3rem;
    color: var(--danger);
    margin-bottom: 1rem;
}

.error-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--danger);
}

.error-message {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* Tooltips */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltip-text {
    visibility: hidden;
    width: 200px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
}

.tooltip .tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #333 transparent transparent transparent;
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* Animações */
@keyframes spinner {
    to {
        transform: rotate(360deg);
    }
}

.spinner {
    display: inline-block;
    width: 2rem;
    height: 2rem;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spinner 0.8s linear infinite;
}

/* Responsividade do conversor */
@media (max-width: 768px) {
    .converter-container {
        padding: 1rem;
    }
    
    .upload-area {
        padding: 1.5rem;
    }
    
    .settings-options {
        flex-direction: column;
    }
    
    .option-card {
        min-width: 100%;
    }
    
    .file-info {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .file-icon {
        margin-bottom: 0.5rem;
    }
    
    .file-actions {
        margin-top: 0.5rem;
    }
}