/* Custom dropdown styling */
.custom-dropdown-item:hover {
    background-color: #F3F4F6 !important;
}

.custom-dropdown-toggle:hover {
    background-color: #F9FAFB !important;
}

.filter-select {
    width: 20rem;
    max-width: 20rem;
}

.filter-select .Select-control {
    position: relative;
}

/* Allow multi-select values to wrap vertically without overlapping other filters. */
.filter-select.Select--multi .Select-control {
    min-height: 2.5rem;
    height: auto;
    max-height: 6.5rem;
    overflow: hidden;
}

.filter-select.Select--multi .Select-multi-value-wrapper {
    white-space: normal;
    max-height: 5.75rem;
    overflow-y: auto;
    overflow-x: hidden;
    display: block;
}

.filter-select.Select--multi .Select-value,
.filter-select.Select--multi .Select-value-label,
.filter-select.Select--multi .Select-placeholder,
.filter-select.Select--multi .Select-input > input {
    line-height: 1.5rem;
}

.filter-select .Select-placeholder {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 0.75rem;
    right: 2.25rem;
    pointer-events: none;
}

.filter-select.Select--multi .Select-value-label {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline;
}

.filter-select.Select--multi .Select-value {
    max-width: 100%;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
}

.filter-select.Select--multi .Select-value-icon {
    display: inline-flex;
    align-items: center;
}

/* Ensure date picker overlays tables and sticky headers. */
.DateRangePicker_picker,
.DateRangePicker_picker__portal {
    z-index: 2000;
}
/* GLP-1 Pill filter bar.
   The dropdowns (react-select) and the date range picker (react-dates) style
   themselves very differently out of the box — different heights, borders and font
   sizes — so the bar looked ragged. These rules give all four controls one height,
   border and type size. Scoped to the bar so no other page is affected. */
.glp1-filter-bar .Select-control {
    height: 2.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.glp1-filter-bar .Select-placeholder,
.glp1-filter-bar .Select--single > .Select-control .Select-value {
    /* Control height less its two borders, so the text sits centred. */
    line-height: 2.375rem;
    padding-left: 0.75rem;
    padding-right: 2rem;
}

.glp1-filter-bar .Select-input {
    height: 2.375rem;
    padding-left: 0.75rem;
}

.glp1-filter-bar .is-focused:not(.is-open) > .Select-control {
    border-color: #6366f1;
    box-shadow: 0 0 0 1px #6366f1;
}

/* DatePicker hardcodes w-80; in this bar it sizes to its content instead so the
   dropdowns sit next to it rather than after a gap. */
.glp1-filter-bar .w-80,
.glp1-filter-bar .DateRangePicker,
.glp1-filter-bar .DateRangePicker > div {
    width: auto;
}

.glp1-filter-bar .DateRangePickerInput {
    display: inline-flex;
    align-items: center;
    height: 2.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.glp1-filter-bar .DateInput {
    width: auto;
    background: transparent;
}

.glp1-filter-bar .DateInput_input {
    width: 6.75rem;
    padding: 0 0.5rem;
    font-size: 0.875rem;
    line-height: 1.25rem;
    font-weight: 400;
    text-align: center;
    background: transparent;
    border-bottom: 2px solid transparent;
}

.glp1-filter-bar .DateInput_input__focused {
    border-bottom-color: #6366f1;
}

.glp1-filter-bar .DateRangePickerInput_arrow {
    display: inline-flex;
    align-items: center;
    color: #6b7280;
}
