﻿/*@import '../abstracts/variables';*/
$mud-palette-colors: primary, secondary, tertiary, info, success, warning, error, dark;

.mud-combobox {
    margin: 0;
    padding: 0;
    position: relative;
    list-style: none;

    &.mud-combobox-padding {
        padding-top: 8px;
        padding-bottom: 8px;
    }
}

.mud-combobox-item {
    width: 100%;
    display: flex;
    position: relative;
    box-sizing: border-box;
    text-align: start;
    align-items: center;
    padding-top: 8px;
    padding-bottom: 8px;
    justify-content: flex-start;
    text-decoration: none;
    outline: none;
    min-height: 48px;

    &.mud-combobox-item-comfort {
        padding-top: 4px;
        padding-bottom: 4px;
        min-height: 40px;
    }

    &.mud-combobox-item-slim {
        padding-top: 2px;
        padding-bottom: 2px;
        min-height: 32px;
    }

    &.mud-combobox-item-superslim {
        padding-top: 0;
        padding-bottom: 0;
        min-height: 24px;
    }

    &.mud-combobox-item-disabled {
        color: var(--mud-palette-action-disabled) !important;
        cursor: default !important;
        pointer-events: none !important;

        .mud-combobox-item-icon {
            color: var(--mud-palette-action-disabled) !important;
        }
    }
}

.mud-combobox-item-clickable {
    color: inherit;
    border: 0;
    cursor: pointer;
    margin: 0;
    outline: 0;
    user-select: none;
    border-radius: 0;
    vertical-align: middle;
    background-color: transparent;
    -webkit-appearance: none;
    -webkit-tap-highlight-color: transparent;
    transition: background-color 150ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;

    &:hover {
        background-color: var(--mud-palette-action-default-hover);
    }
}

.mud-combobox-item-gutters {
    padding-left: 16px;
    padding-right: 16px;
}


.mud-combobox-item-text {
    flex: 1 1 auto;
    min-width: 0;
    margin-top: 4px;
    margin-bottom: 4px;
    padding-inline-start: 8px;
    padding-inline-end: 8px;
}


.mud-combobox-item-text-inset {
    padding-left: 56px;
    padding-inline-start: 56px;
    padding-inline-end: unset;
}

.mud-combobox-item-icon {
    color: var(--mud-palette-action-default);
    display: inline-flex;
    /*min-width: 56px;*/
    flex-shrink: 0;
    padding-inline-start: 8px;
    padding-inline-end: 8px;
    margin-inline-start: -4px;
    margin-inline-end: 4px;
}

.mud-combobox-item-multiselect {
    max-height: 32px;

    &.mud-combobox-item-multiselect-checkbox {
        padding-inline-end: 16px;
    }
}

.mud-combobox-subheader {
    color: var(--mud-palette-action-default);
    background-color: var(--mud-palette-background);
    font-size: 0.875rem;
    box-sizing: border-box;
    list-style: none;
    font-weight: 500;
    padding-top: 16px;
    padding-bottom: 16px;
}

.mud-combobox-subheader-secondary-background {
    background-color: var(--mud-palette-background-gray);
}

.mud-combobox-subheader-gutters {
    padding-left: 16px;
    padding-right: 16px;
}

.mud-combobox-subheader-inset {
    padding-left: 72px;
    padding-inline-start: 72px;
    padding-inline-end: unset;
}

.mud-combobox-subheader-sticky {
    top: -8px;
    z-index: 1;
    position: sticky;

    &.mud-combobox-subheader-sticky-dense {
        top: 0;
    }
}

.mud-combobox-item-hilight {
    background-color: var(--mud-palette-background-gray);
}

.mud-combobox-item-hilight {
    background-color: var(--mud-palette-lines-default) !important;
}

.mud-combobox-item-bordered {
    border-left: 4px solid var(--mud-palette-lines-default);
    padding-inline-start: 12px;
}

@each $color in $mud-palette-colors {
    .mud-combobox-item-bordered-#{$color} {
        border-left: 4px solid var(--mud-palette-#{$color});
        padding-inline-start: 12px;
    }
}

.mud-combobox-item-nested-background {
    background-color: var(--mud-palette-background-gray);
}

.mud-combobox-item-avatar {
    min-width: 56px;
    flex-shrink: 0;
}

.mud-combobox-highlighter {
    background-color: transparent;
    font-weight: bold;
    text-decoration: underline;
}
