/* css/documentos.css - Estilos para el módulo de documentos */

/* 1. Contenedor Principal y Filtros
-------------------------------------------------- */
#filterSection {
    background-color: var(--card, #f8fafc);
    padding: 1.25rem;
    border-radius: var(--radius, 14px);
    box-shadow: var(--shadow, 0 8px 24px rgba(0,0,0,.06));
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    margin-bottom: 2rem;
}

#filterSection .input-field,
#filterSection .btn {
    margin-right: 0; /* Remove old margin */
}

#searchInput {
    flex-grow: 0 !important;
    width: 100%;
    max-width: 450px !important;
    min-width: 200px;
}

#filterType, #filterYear {
    max-width: 150px;
}

/* 2. Estilos del Árbol de Carpetas
-------------------------------------------------- */
.tree-container {
    background-color: transparent;
    box-shadow: none;
    padding: 0;
}

.tree-container ul {
    list-style: none;
    padding-left: 0;
}

.tree-container ul ul {
    padding-left: 28px; /* Indentación para sub-niveles */
    border-left: 2px solid #e2e8f0;
    margin-left: 12px;
}

.folderItem, .fileItem {
    padding: 0.25rem 0;
}

/* 3. Estilo de las Filas (Carpetas y Archivos)
-------------------------------------------------- */
.item-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem;
    border-radius: 10px;
    transition: background-color 0.2s ease;
}

.item-row:hover {
    background-color: var(--card, #f8fafc);
}

.item-icon {
    font-size: 1.2em;
    width: 24px;
    text-align: center;
}

.item-icon .fa-folder {
    color: #f7b731;
}

.item-icon .fa-file-alt {
    color: #3b82f6;
}

.item-name {
    flex-grow: 1;
    font-weight: 500;
    color: var(--text, #1e293b);
}

.folderTitle {
    cursor: pointer;
}

.item-date {
    font-size: 0.875em;
    color: var(--muted, #64748b);
    width: 170px;
    flex-shrink: 0;
    text-align: left;
}

.item-actions {
    display: flex;
    gap: 0.75rem;
    width: 80px; /* Ancho fijo para alinear acciones */
    justify-content: flex-end;
}

.item-actions i {
    cursor: pointer;
    color: var(--muted, #64748b);
    font-size: 1.1em;
    transition: color 0.2s ease, transform 0.2s ease;
}

.item-actions i:hover {
    transform: scale(1.15);
}

.item-actions .fa-upload:hover {
    color: #3b82f6;
}

.item-actions .fa-folder-plus:hover {
    color: #10b981;
    transform: scale(1.2);
}

.item-actions .fa-trash-alt:hover {
    color: #dc2626;
}

/* Guías visuales para el árbol */
.tree-container ul ul::before {
    content: "";
    position: absolute;
    top: 0;
    left: 12px;
    width: 2px;
    height: 100%;
    background: #e2e8f0;
}

.folderItem {
    position: relative;
}
