/* CSC Hierarchical Dropdown - Global Styles */

.csc-hierarchical-dropdown {
    position: relative;
    width: 100%;
}

.csc-header {
    background-color: #FDBB30;
    color: white;
    padding: 10px 20px;
    font-size: 18px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 0;
    user-select: none;
}

.csc-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    flex: 1;
}

.csc-header-left:hover {
    opacity: 0.9;
}

.csc-header-right {
    display: flex;
    align-items: center;
}

.select-all-btn {
    color: white !important;
    font-size: 14px !important;
    text-transform: none !important;
    padding: 4px 12px !important;
}

.select-all-btn:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
}

.csc-header-icon {
    font-size: 12px;
    transition: transform 0.2s;
}

.csc-header-icon.open {
    transform: rotate(180deg);
}

.csc-dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    width: 100%;
    max-height: 500px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-radius: 0 0 4px 4px;
}

.csc-dropdown-content.open {
    display: block;
}

.csc-search {
    padding: 12px;
    border-bottom: 1px solid #e0e0e0;
    background-color: #f5f5f5;
    display: flex;
    align-items: center;
    gap: 8px;
    position: sticky;
    top: 0;
    z-index: 10;
}

.search-input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: 14px;
    color: #333;
    font-family: inherit;
}

.search-input::placeholder {
    color: #999;
}

.search-icon {
    color: #999;
    font-size: 16px;
}

.csc-tree {
    padding: 8px 0;
}

.no-results {
    padding: 24px;
    text-align: center;
    color: #999;
}

/* Tree Node Styles */
.csc-node {
    padding: 2px 8px;
}

.node-content {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    cursor: pointer;
    border-radius: 4px;
}

.node-content:hover {
    background-color: #f0f0f0;
}

.chevron {
    width: 14px;
    height: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 10px;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.2s;
}

.chevron.empty {
    visibility: hidden;
}

.chevron.expanded {
    transform: rotate(90deg);
}

/* MudBlazor Checkbox Overrides */
.node-checkbox {
    margin: 0 !important;
    padding: 0 !important;
    width: auto !important;
    height: auto !important;
}

.node-checkbox .mud-checkbox {
    margin: 0 !important;
    padding: 0 !important;
}

.node-checkbox .mud-button-root {
    padding: 0 !important;
    min-width: 16px !important;
    width: 16px !important;
    height: 16px !important;
}

.node-checkbox .mud-icon-root {
    font-size: 16px !important;
    width: 16px !important;
    height: 16px !important;
}

.node-checkbox .mud-checkbox-icons {
    width: 16px !important;
    height: 16px !important;
}

.node-label {
    font-size: 14px;
    color: #333;
    user-select: none;
    flex: 1;
}

.node-children {
    display: none;
    padding-left: 30px;
}

.node-children.expanded {
    display: block;
}
