/* Custom styles for grammar items tree */
/*.grammar-tree-wrapper {
    font-size: 12px;
    line-height: 24px;
}
*/
/* Target third level items (individual grammar items like "A1: resumptive: adverbial") */
/*.grammar-tree-wrapper .mantine-Tree-node .mantine-Tree-node .mantine-Tree-label {
    font-size: 10px !important;
    line-height: 24px !important;
}*/

/* Alternative selector using CSS nesting levels */
.mantine-Tree-subtree [data-level="3"] {
    font-size: 10px !important;
    line-height: 24px !important;
}

/* Another approach targeting deeply nested items */
/*#grammarItemsTree > div > div > div > div {
    font-size: 10px !important;
    line-height: 24px !important;
}
*/
/* Ensure checkbox alignment with smaller font */
.grammar-tree-wrapper .mantine-Tree-node .mantine-Tree-node .mantine-Checkbox-root {
    align-items: flex-start;
}

/* Enhanced UI Improvements */

/* Smooth transitions for interactive elements */
.mantine-Button-root,
.mantine-SegmentedControl-root,
.mantine-Paper-root,
.mantine-Badge-root {
    transition: all 0.2s ease-in-out;
}

/* Hover effect for papers */
.mantine-Paper-root:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Enhanced accordion styling */
.mantine-Accordion-item {
   /* border-radius: 8px !important;
    margin-bottom: 8px;*/
    transition: all 0.2s ease;
}

.mantine-Accordion-item:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

.mantine-AccordionControl-root {
    padding: 12px 16px !important;
}

/* Badge hover effects */
.mantine-Badge-root {
    cursor: default;
}

.mantine-Badge-root:hover {
    transform: translateY(-1px);
}

/* Menu dropdown improvements */
.mantine-Menu-dropdown {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15) !important;
    border-radius: 8px !important;
}

.mantine-MenuItem-root {
    border-radius: 4px !important;
    margin: 2px 4px !important;
}

/* Segmented control enhancements */
.mantine-SegmentedControl-root {
    background-color: #f1f3f5 !important;
    padding: 4px !important;
}

.mantine-SegmentedControl-indicator {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

/* Quick stats panel styling */
#grammar-quick-stats {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
}

/* Button group spacing */
.mantine-Group-root .mantine-Button-root {
    flex: 1;
}

/* Loading state animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

.mantine-Button-root[data-loading="true"] {
    animation: pulse 1.5s ease-in-out infinite;
}

/* Modal styling */
.mantine-Modal-content {
    border-radius: 12px !important;
}

.mantine-Modal-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

/* Tooltip improvements */
.mantine-Tooltip-tooltip {
    font-size: 13px !important;
    padding: 8px 12px !important;
    border-radius: 6px !important;
}

/* AG Grid selected row styling - using DMC default blue (matching render plot button) */
.ag-row-selected {
    background-color: #1f77b4 !important; /* DMC default blue */
    color: white !important;
}

.ag-row-selected:hover {
    background-color: #1c7ed6 !important; /* Darker blue on hover */
}

/* Ensure text is readable on blue background */
.ag-row-selected .ag-cell {
    color: white !important;
}

/* Make checkboxes visible on selected rows if present */
.ag-row-selected input[type="checkbox"] {
    filter: brightness(0) invert(1);
}
