/**
 * Estilos para Temas Padre (Categorías no seleccionables)
 * Fecha: 2 de Noviembre de 2025
 * 
 * MS_PADRE_ID = 0 indica que es un tema padre (categoría)
 * Los temas padre NO deben ser clickeables/seleccionables
 * Se muestran como separadores visuales
 */

/* ===== SIDEBAR DE MENCIONES - Tema Padre (Divisor de Sección) ===== */

/* ===== CARPETA COLAPSABLE (Categoría con hijos) ===== */
.tema-categoria-group {
    margin: 8px 0;
}

.tema-categoria-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: linear-gradient(90deg, #f8f9fa 0%, #ffffff 100%);
    border-left: 3px solid #0d6efd;
    border-radius: 4px;
    cursor: pointer;
    margin-bottom: 4px;
    transition: all 0.2s ease;
}

.tema-categoria-header:hover {
    background: linear-gradient(90deg, #e9ecef 0%, #f8f9fa 100%);
}

.categoria-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.categoria-icon {
    width: 18px;
    height: 18px;
    color: #0d6efd;
}

.categoria-name {
    font-weight: 600;
    font-size: 0.85rem;
    color: #495057;
}

.categoria-chevron {
    width: 16px;
    height: 16px;
    color: #6c757d;
    transition: transform 0.2s ease;
}

.tema-categoria-header[aria-expanded="true"] .categoria-chevron {
    transform: rotate(180deg);
}

.categoria-hijos {
    padding-left: 12px;
}

/* ===== TEMA HIJO (dentro de carpeta colapsable) ===== */
.tema-hijo-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px 8px 24px;  /* Indentación 24px */
    margin: 2px 0;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    color: #212529;
}

.tema-hijo-item:hover:not(.disabled) {
    background-color: #f8f9fa;
    transform: translateX(2px);
}

.tema-hijo-item.active {
    background-color: #e7f1ff;
    border-left: 3px solid #0d6efd;
}

.tema-hijo-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.tema-hijo-name {
    flex: 1;
    font-size: 0.9rem;
    color: #495057;
}

/* ===== TEMA NORMAL (padre sin hijos) ===== */
.tema-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    margin: 4px 0;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    color: #212529;
}

.tema-item:hover:not(.disabled) {
    background-color: #f8f9fa;
}

.tema-item.active {
    background-color: #e7f1ff;
    border-left: 3px solid #0d6efd;
}

.tema-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.tema-name {
    flex: 1;
    font-size: 0.9rem;
    color: #495057;
}

/* ===== DROPDOWN SELECT - Tema Padre ===== */
select option.tema-padre-option {
    background-color: #f8f9fa !important;
    color: #6c757d !important;
    font-weight: 600;
    font-style: italic;
}

select option.tema-padre-option:disabled {
    opacity: 0.7;
}

/* ===== CHECKBOXES DE EXPORT - Categoría (padre con hijos) ===== */
.filter-checkbox.tema-categoria-checkbox {
    background-color: #f8f9fa;
    border-left: 3px solid #0d6efd;
    border-radius: 4px;
    padding: 8px 12px;
    margin: 8px 0 4px 0;
}

.filter-checkbox.tema-categoria-checkbox input[type="checkbox"]:disabled {
    cursor: not-allowed;
}

.tema-export-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 700;
    font-size: 0.75rem;
    margin-right: 8px;
}

.tema-categoria-checkbox .tema-export-icon {
    background: none;
    width: auto;
}

/* ===== ANÁLISIS - Tema Padre en Selector ===== */
#selectedMenus .menu-item.tema-padre {
    background-color: #f8f9fa;
    border-left-color: #dee2e6 !important;
    opacity: 0.7;
}

#selectedMenus .menu-item.tema-padre .menu-name {
    color: #6c757d;
    font-weight: 600;
}

/* No permitir remover temas padre seleccionados accidentalmente */
#selectedMenus .menu-item.tema-padre .btn-remove {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ===== ESTADOS VISUALES ===== */

/* Tema padre con puntero que indica "no clickeable" */
.tema-padre,
.tema-padre-option,
.tema-padre-checkbox {
    cursor: not-allowed !important;
    user-select: none;
}

/* Iconos en temas padre más opacos */
.tema-padre i[data-lucide],
.tema-padre-option i[data-lucide] {
    opacity: 0.6;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .tema-item.tema-padre {
        font-size: 0.85rem;
    }
    
    .tema-item.tema-padre .badge {
        font-size: 0.55rem;
    }
}

/* ===== TOOLTIP para temas padre ===== */
.tema-padre[title]:hover::after {
    content: attr(title);
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    background-color: #495057;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    white-space: nowrap;
    margin-left: 10px;
    z-index: 1000;
    pointer-events: none;
}

