/* document-manager.css */

.document-manager-container {
    width: 90%;
    margin: 20px auto;
    background-color: #fff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.document-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.document-header-content {
    display: flex;
    align-items: center;
}

.document-logo .logo-svg {
    width: 60px;
    height: 60px;
    margin-right: 15px;
}

.document-title h1 {
    margin: 0;
    font-size: 24px;
}

.document-title p {
    margin: 0;
    font-size: 14px;
    color: #666;
}

.document-main-panel {
    padding: 20px;
    border-top: 1px solid #eee;
}

#upload-btn {
    margin-bottom: 20px;
}

/* Estilos para el modal de compartir */
.share-modal-overlay {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
}

.share-modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 600px;
    position: relative;
    border-radius: 0.75rem;
}

.close-button {
    color: #aaa;
    position: absolute;
    top: 10px;
    right: 25px;
    font-size: 28px;
    font-weight: bold;
}

.close-button:hover,
.close-button:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

/* Estilos de tabla mejorados */
#documents-table {
    width: 100%;
}

#documents-table thead th {
    background-color: var(--card-bg, #1f2937);
    color: var(--text-primary, #f9fafb);
    padding: 1rem;
    font-weight: 600;
}

#documents-table tbody td {
    padding: 1rem;
    vertical-align: middle;
}

#documents-table tbody tr {
    border-bottom: 1px solid var(--border-color, #374151);
}

#documents-table tbody tr:hover {
    background-color: rgba(99, 102, 241, 0.05);
}

/* Iconos de archivo */
.file-icon {
    font-size: 1.5rem;
    margin-right: 0.75rem;
}

/* Progreso de carga */
.upload-progress {
    margin-top: 1rem;
    padding: 1rem;
    background-color: #f3f4f6;
    border-radius: 0.5rem;
    display: none;
}

.upload-progress.active {
    display: block;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background-color: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 0.5rem;
}

.progress-fill {
    height: 100%;
    background-color: #3b82f6;
    transition: width 0.3s ease;
}

/* Responsive */
@media (max-width: 768px) {
    .document-manager-container {
        width: 95%;
        padding: 15px;
    }
    
    .share-modal-content {
        width: 90%;
    }
    
    /* Ocultar columnas menos importantes en móvil */
    #documents-table thead th:nth-child(2),
    #documents-table tbody td:nth-child(2) {
        display: none; /* Ocultar Archivo Original */
    }
    
    #documents-table thead th:nth-child(3),
    #documents-table tbody td:nth-child(3) {
        display: none; /* Ocultar Tipo */
    }
    
    #documents-table thead th:nth-child(4),
    #documents-table tbody td:nth-child(4) {
        display: none; /* Ocultar Tamaño */
    }
    
    #documents-table thead th:nth-child(5),
    #documents-table tbody td:nth-child(5) {
        display: none; /* Ocultar Fecha */
    }
    
    /* Ajustar columnas visibles: Nombre y Acciones */
    #documents-table thead th:nth-child(1),
    #documents-table tbody td:nth-child(1) {
        width: 55%;
    }
    
    #documents-table thead th:nth-child(6),
    #documents-table tbody td:nth-child(6) {
        width: 45%;
    }
    
    /* Botones de acción más compactos en móvil */
    .action-buttons {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.25rem;
    }
    
    .action-btn {
        width: 32px;
        height: 32px;
        padding: 0.375rem;
        font-size: 0.875rem;
    }
    
    /* Hacer tabla scrollable horizontalmente si es necesario */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    #documents-table {
        min-width: 400px;
    }
    
    #documents-table thead th,
    #documents-table tbody td {
        padding: 0.75rem 0.5rem;
        font-size: 0.875rem;
    }
    
    /* Nombre del documento en móvil más pequeño */
    #documents-table tbody td:first-child .display-name {
        font-size: 0.875rem;
    }
    
    #documents-table tbody td:first-child i {
        font-size: 1rem;
    }
}
