.model-comparison-subtitle,
.model-comparison-badge {
    font-family: var(--mud-typography-body2-family) !important;
}

.model-comparison-selection-panel {
    position: relative;
    z-index: 1;
}

.model-comparison-selected-count {
    color: var(--mud-palette-text-primary);
}

.model-comparison-heading {
    font-size: 1.2rem;
}

.model-comparison-column-heading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.model-comparison-badge {
    font-weight: 400;
}

.model-comparison-difference-icon {
    color: var(--mud-palette-white);
    font-size: 0.8rem;
}

.model-comparison-expandable-row {
    cursor: pointer;
}

.model-comparison-group-heading {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}

.model-comparison-group-icon,
.model-comparison-holding-name {
    font-size: 0.8rem;
}

.model-comparison-group-value {
    font-weight: 600;
}

.model-comparison-child-label {
    padding-left: 2.5rem;
}

.val-color {
    color: var(--BM-Supporting-Black) !important;
}

.selection-panel {
/*    background: white;*/
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    margin-bottom: 30px;
}

.selection-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.selection-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
}

.selection-count {
    background: linear-gradient(135deg, #667eea 0%, #002974 100%);
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
}

.dropdown-container {
    position: relative;
    margin-bottom: 20px;
}

.dropdown-trigger {
    width: 100%;
    padding: 16px 20px;
    border: 1px solid lightGray;
    border-radius: 12px;
    /*    background: white;*/
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1rem;
    color: #4a5568;
    transition: all 0.3s ease;
    border-color: rgba(107, 163, 245, 0.3);
}

    .dropdown-trigger:hover {
        border-color: lightGray;
        box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
    }

    .dropdown-trigger.active {
        border-color: lightGray;
        border-radius: 12px 12px 0 0;
    }

.dropdown-arrow {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

    .dropdown-arrow.rotated {
        transform: rotate(180deg);
    }

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--mud-palette-background);
    border: 2px solid rgba(255,255,255,0.1);
    border-top: none;
    border-radius: 0 0 12px 12px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

    .dropdown-menu.active {
        display: block;
    }

.search-box {
    padding: 15px;
    border-bottom: 2px solid rgba(255,255,255,0.1);
    position: sticky;
    top: 0;
    background: var(--mud-palette-background);
}

.search-input {
    width: 100%;
    padding: 10px 15px;
    border: 2px solid lightGray;
    border-radius: 8px;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.3s ease;
    background: var(--mud-palette-background);
}

    .search-input:focus {
        border-color: #667eea;
    }

.model-options {
    padding: 10px;
}

.model-option {
    padding: 12px 15px;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.2s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 5px;
}

    .model-option:hover {
/*        background: #f7fafc;*/
    }

    .model-option.disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

.model-checkbox {
    width: 20px;
    height: 20px;
    min-width: 20px;
    border: 2px solid #cbd5e0;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.model-option.selected .model-checkbox {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
}

.model-checkbox::after {
    content: '✓';
    color: white;
    font-weight: bold;
    font-size: 0.85rem;
    display: none;
}

.model-option.selected .model-checkbox::after {
    display: block;
}

.model-name {
    flex: 1;
    font-size: 0.95rem;
    color: var(--mud-palette-text-primary);
    font-weight: 500;
    word-wrap: break-word;
}

.model-option.selected .model-name {
    font-weight: 600;
    color: #667eea;
}

.selected-models-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    min-height: 40px;
}

.selected-model-tag {
    background: linear-gradient(135deg, #667eea 0%, #002974 100%);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    max-width: 300px;
}

.selected-model-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.remove-model {
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: bold;
    opacity: 0.9;
    transition: opacity 0.2s ease;
}

    .remove-model:hover {
        opacity: 1;
    }

.no-models-message {
    color: #718096;
    font-size: 0.95rem;
    font-style: italic;
    padding: 10px 0;
}

.no-results {
    text-align: center;
    padding: 20px;
    color: #718096;
    font-size: 0.95rem;
}

.comparison-wrapper {
/*    background: white;*/
    border-radius: 5px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

    .comparison-wrapper.active {
        opacity: 1;
        transform: translateY(0);
    }

.comparison-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 10px 0;
}

    .comparison-table thead {
        background: linear-gradient(135deg, #667eea 0%, #002974 100%);
        color: white;
    }

    .comparison-table thead th:first-child {
        background: #2d3748;
        width:370px;
    }

    .comparison-table thead th:last-child {
            background: #2d3748;
            width: 150px;
            text-align:center;
    }

    .comparison-table.dark thead th:first-child {
        background: linear-gradient(135deg, #5d5d69, #6C6C80);
    }

    .comparison-table.dark thead th:last-child {
        background: linear-gradient(135deg, #5d5d69, #6C6C80);
    }

    .comparison-table th {
        padding: 20px;
        text-align: center;
        font-weight: 600;
        font-size: 1rem;
        border-right: 1px solid rgba(255,255,255,0.1);
        border-radius: 10px 10px 0px 0px;
    }

        .comparison-table th:first-child {
            text-align: left;
        }
        .comparison-table th:last-child {
            border-right: none;
        }
    .comparison-table tbody tr:last-child td {
        border-bottom: 1px solid #e2e8f0;
        border-color: rgba(107, 163, 245, 0.3);
        border-radius: 0px 0px 10px 10px;
    }

.model-name-header {
    font-size: 0.95rem;
    max-width: 400px;
    word-wrap: break-word;
}

.comparison-table tbody tr {
    border-bottom: 1px solid #e2e8f0;
}

    .comparison-table tbody tr:hover {
/*        background: #f8faff;*/
        transition: background 0.3s ease;
    }

.comparison-table tbody tr.group-row {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(139, 92, 246, 0.05));
    font-weight: 600;
    border-top: 2px solid lightGray;
    border-bottom: 2px solid lightGray;
}

    .comparison-table tbody tr.group-row:hover {
        background: linear-gradient(135deg, rgba(102, 126, 234, 0.15), rgba(139, 92, 246, 0.1));
    }

.comparison-table tbody tr.child-row {
    background: var(--mud-palette-background);
}

    .comparison-table tbody tr.child-row:hover {
        background: rgba(248, 250, 255, 0.5);
    }

.field-label-cell {
    padding: 18px 20px;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
    /*    background: #f7fafc;*/
    border-right: 1px solid lightGray;
    font-size: 0.95rem;
    border-left: 1px solid lightGray;
    border-color: rgba(107, 163, 245, 0.3);
}

.field-value-cell {
    padding: 18px 20px;
    color: var(--mud-palette-text-primary);
    font-size: 0.95rem;
    border-right: 1px solid lightGray;
    border-left: 1px solid lightGray;
    text-align: center;
    border-color: rgba(107, 163, 245, 0.3);
}

    .field-value-cell:last-child {
        border-right: 1px solid lightGray;
        border-left: 1px solid lightGray;
        border-color: rgba(107, 163, 245, 0.3);
    }

.risk-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
}

.risk-very.low {
    background: #c6f6d5;
    color: #22543d;
}

.risk-low {
    background: #bee3f8;
    color: #2c5282;
}

.risk-low-to-medium {
    background: #e6f4d0; /* Light yellow-green */
    color: #4a5f2c; /* Dark olive green */
}

.risk-medium {
    background: #feebc8;
    color: #7c2d12;
}

.risk-high {
    background: #fed7d7;
    color: #742a2a;
}

.risk-very.high {
    background: #feb2b2;
    color: #742a2a;
}

.risk-extreme {
    background: #fc8181;
    color: #742a2a;
}

.no-selection-message {
    /*    background: white;*/
    border-radius: 20px;
    padding: 60px 40px;
    text-align: center;
    border-color: rgba(107, 163, 245, 0.3);
    box-shadow: 0 8px 24px rgba(107, 163, 245, 0.15);
}


.no-selection-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.no-selection-message h2 {
    color: var(--mud-palette-text-primary);
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.no-selection-message p {
    color: #718096;
    font-size: 1.05rem;
}

/* Scrollbar Styles */
.dropdown-menu::-webkit-scrollbar {
    width: 8px;
}

.dropdown-menu::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.dropdown-menu::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 4px;
}

    .dropdown-menu::-webkit-scrollbar-thumb:hover {
        background: linear-gradient(135deg, #5569d4 0%, #6b4295 100%);
    }

/* Responsive Design */
@media (max-width: 768px) {
    .header h1 {
        font-size: 2rem;
    }

    .selection-header {
        flex-direction: column;
        align-items: stretch;
    }

    .comparison-table {
        font-size: 0.85rem;
    }

        .comparison-table th,
        .comparison-table td {
            padding: 12px;
        }

    .selected-model-tag {
        max-width: 100%;
    }
}
