﻿/* Hierarchical Text Display Styles */

.hierarchical-text {
    line-height: 1.7 !important;
    font-size: 0.95rem !important;
}

.hierarchical-text-line {
    margin: 0.35rem 0 !important;
    display: flex !important;
    position: relative !important;
}

.hierarchical-marker {
    font-weight: 600 !important;
    margin-right: 0.5rem !important;
    color: var(--mud-palette-text-secondary, #666) !important;
    flex-shrink: 0 !important;
    display: inline-block !important;
    min-width: 1.5rem !important;
}

.hierarchical-content {
    display: inline !important;
    flex: 1 !important;
}

/* Hierarchy Levels - Indentation */
.hierarchical-level-0 {
    padding-left: 0 !important;
    font-weight: 500 !important;
}

.hierarchical-level-1 {
    padding-left: 2rem !important;
}

    .hierarchical-level-1 .hierarchical-marker {
        min-width: 1.2rem !important;
    }

.hierarchical-level-2 {
    padding-left: 4rem !important;
}

    .hierarchical-level-2 .hierarchical-marker {
        min-width: 1.5rem !important;
    }

/* Keyword Highlighting */
.keyword-highlight {
    font-weight: 600 !important;
    padding: 0.1rem 0.3rem !important;
    border-radius: 3px !important;
    background-color: rgba(var(--mud-palette-primary-rgb, 94, 53, 177), 0.1) !important;
    color: var(--mud-palette-primary, #5e35b1) !important;
}

.keyword-exc {
    font-weight: 700 !important;
    padding: 0.1rem 0.3rem !important;
    border-radius: 3px !important;
    background-color: rgba(var(--mud-palette-error-rgb, 244, 67, 54), 0.15) !important;
    color: var(--mud-palette-error, #f44336) !important;
}

.keyword-via {
    font-weight: 600 !important;
    padding: 0.1rem 0.3rem !important;
    border-radius: 3px !important;
    background-color: rgba(var(--mud-palette-info-rgb, 33, 150, 243), 0.12) !important;
    color: var(--mud-palette-info, #2196f3) !important;
}

.keyword-and-then {
    font-weight: 700 !important;
    padding: 0.1rem 0.3rem !important;
    border-radius: 3px !important;
    background-color: rgba(var(--mud-palette-warning-rgb, 255, 152, 0), 0.15) !important;
    color: var(--mud-palette-warning-darken, #f57c00) !important;
}

.keyword-arr,
.keyword-dep {
    font-weight: 600 !important;
    padding: 0.1rem 0.3rem !important;
    border-radius: 3px !important;
    background-color: rgba(var(--mud-palette-success-rgb, 76, 175, 80), 0.12) !important;
    color: var(--mud-palette-success, #4caf50) !important;
}

.keyword-not-avbl {
    font-weight: 700 !important;
    padding: 0.1rem 0.3rem !important;
    border-radius: 3px !important;
    background-color: rgba(var(--mud-palette-error-rgb, 244, 67, 54), 0.15) !important;
    color: var(--mud-palette-error, #f44336) !important;
}

.keyword-avbl {
    font-weight: 600 !important;
    padding: 0.1rem 0.3rem !important;
    border-radius: 3px !important;
    background-color: rgba(var(--mud-palette-success-rgb, 76, 175, 80), 0.12) !important;
    color: var(--mud-palette-success, #4caf50) !important;
}

/* Dark theme adjustments */
@media (prefers-color-scheme: dark) {
    .hierarchical-marker {
        color: var(--mud-palette-text-secondary, #aaa) !important;
    }

    .keyword-highlight {
        background-color: rgba(var(--mud-palette-primary-rgb, 186, 104, 200), 0.2) !important;
    }

    .keyword-exc,
    .keyword-not-avbl {
        background-color: rgba(var(--mud-palette-error-rgb, 244, 67, 54), 0.25) !important;
    }

    .keyword-via {
        background-color: rgba(var(--mud-palette-info-rgb, 33, 150, 243), 0.22) !important;
    }

    .keyword-and-then {
        background-color: rgba(var(--mud-palette-warning-rgb, 255, 152, 0), 0.25) !important;
    }

    .keyword-arr,
    .keyword-dep,
    .keyword-avbl {
        background-color: rgba(var(--mud-palette-success-rgb, 76, 175, 80), 0.22) !important;
    }
}

/* Responsive adjustments for mobile */
@media (max-width: 600px) {
    .hierarchical-level-1 {
        padding-left: 1.5rem !important;
    }

    .hierarchical-level-2 {
        padding-left: 3rem !important;
    }

    .hierarchical-text {
        font-size: 0.9rem !important;
    }

    .hierarchical-marker {
        min-width: 1.2rem !important;
    }
}
