/* Post-MudBlazor overrides for compact toolbar selects.
   This file is loaded after MudBlazor.min.css so it can win against the library defaults,
   including popovers rendered outside Razor CSS-isolation scope. */

.webhooks-filter-select,
.tasks-status-select {
    width: 176px;
    min-width: 176px;
    max-width: 176px;
    margin: 0;
}

.webhooks-filter-select > .mud-input-control-input-container,
.tasks-status-select > .mud-input-control-input-container {
    width: 100%;
    max-width: none;
    min-width: 0;
}

.webhooks-filter-select .mud-input.mud-select-input,
.tasks-status-select .mud-input.mud-select-input {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    max-width: none !important;
    min-width: 0 !important;
    min-height: 36px;
    height: 36px;
    margin-top: 0 !important;
    padding: 0 !important;
    background: #181A1B;
    color: #fff;
    border-radius: 6px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    line-height: 36px;
    box-sizing: border-box;
}

.webhooks-filter-select input.mud-input-slot.mud-select-input,
.tasks-status-select input.mud-input-slot.mud-select-input {
    flex: 1 1 auto;
    width: 0;
    max-width: none !important;
    min-width: 0 !important;
    min-height: 36px;
    height: 36px;
    margin: 0 !important;
    padding: 0 20px 0 12px !important;
    border: 0;
    background: transparent;
    color: #fff;
    font: inherit;
    line-height: 36px;
    box-sizing: border-box !important;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.webhooks-filter-select div.mud-input-slot.mud-select-input[style*="display:none"],
.tasks-status-select div.mud-input-slot.mud-select-input[style*="display:none"] {
    width: 0 !important;
    min-width: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
}

.webhooks-filter-select .mud-input-adornment-end,
.tasks-status-select .mud-input-adornment-end {
    flex: 0 0 auto;
    width: auto !important;
    min-width: auto !important;
    margin: 0 !important;
    padding-right: 0;
    color: #7f8081;
}

.webhooks-filter-select .mud-select-arrow,
.tasks-status-select .mud-select-arrow {
    color: #7f8081;
    right: 4px;
}

.webhooks-filter-select .mud-input.mud-input-outlined .mud-input-outlined-border,
.tasks-status-select .mud-input.mud-input-outlined .mud-input-outlined-border {
    border-color: rgba(255, 255, 255, 0.08);
    transition: border-width 0.2s, border-color 0.2s;
}

.webhooks-filter-select .mud-input.mud-input-outlined:not(.mud-disabled):not(:focus-within):hover .mud-input-outlined-border,
.tasks-status-select .mud-input.mud-input-outlined:not(.mud-disabled):not(:focus-within):hover .mud-input-outlined-border {
    border-color: rgba(255, 255, 255, 0.15);
}

.webhooks-filter-select .mud-input.mud-input-outlined:focus-within > .mud-input-outlined-border,
.tasks-status-select .mud-input.mud-input-outlined:focus-within > .mud-input-outlined-border,
.webhooks-filter-select .mud-input.mud-input-outlined:focus-within .mud-shrink > .mud-input-outlined-border,
.tasks-status-select .mud-input.mud-input-outlined:focus-within .mud-shrink > .mud-input-outlined-border {
    border-width: 2px;
    border-color: #1EE797 !important;
}

.toolbar-select-popover {
    overflow-y: hidden !important;
}

.toolbar-select-popover .mud-list,
.toolbar-select-list {
    max-height: 300px;
    overflow-y: auto;
    overflow-x: hidden;
    background: #242527 !important;
    border-radius: 10px !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35) !important;
    padding: 6px 0 !important;
}

.toolbar-select-popover .mud-list-item,
.toolbar-select-popover .mud-list-item-clickable,
.toolbar-select-list .mud-list-item,
.toolbar-select-list .mud-list-item-clickable {
    display: flex;
    align-items: center;
    align-self: center;
    width: calc(100% - 20px);
    max-width: calc(100% - 20px);
    min-height: 30px;
    height: 30px;
    margin: 4px 10px;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    padding-left: 8px !important;
    padding-right: 8px !important;
    box-sizing: border-box;
    border-radius: 8px !important;
    color: #fff !important;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    transition: background 0.15s, color 0.15s;
}

.toolbar-select-popover .mud-list-item-text,
.toolbar-select-list .mud-list-item-text {
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    white-space: nowrap !important;
    overflow: hidden;
    text-overflow: ellipsis;
}

.toolbar-select-popover .mud-list-item-text,
.toolbar-select-popover .mud-list-item-text > *,
.toolbar-select-popover .mud-list-item-text .mud-typography,
.toolbar-select-list .mud-list-item-text,
.toolbar-select-list .mud-list-item-text > *,
.toolbar-select-list .mud-list-item-text .mud-typography {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    white-space: nowrap !important;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 30px !important;
}

.toolbar-select-popover .mud-list-item:hover,
.toolbar-select-popover .mud-list-item-clickable:hover,
.toolbar-select-popover .mud-list-item.mud-selected-item,
.toolbar-select-popover .mud-list-item-clickable.mud-selected-item,
.toolbar-select-popover .mud-theme-primary,
.toolbar-select-list .mud-list-item:hover,
.toolbar-select-list .mud-list-item-clickable:hover,
.toolbar-select-list .mud-list-item.mud-selected-item,
.toolbar-select-list .mud-list-item-clickable.mud-selected-item,
.toolbar-select-list .mud-theme-primary {
    background: rgba(30, 231, 151, 0.12) !important;
    color: #1EE797 !important;
}

.toolbar-select-popover .mud-primary-text,
.toolbar-select-popover .mud-theme-primary .mud-list-item-text,
.toolbar-select-popover .mud-theme-primary .mud-list-item-secondary-text,
.toolbar-select-list .mud-primary-text,
.toolbar-select-list .mud-theme-primary .mud-list-item-text,
.toolbar-select-list .mud-theme-primary .mud-list-item-secondary-text {
    color: #1EE797 !important;
}
