/* SoftCrow searchable-list components — global styles.
   Loaded by consumers via:
     <link rel="stylesheet" href="_content/SoftCrow.Razor/css/softcrow-search.css" />
*/

/* -- SubmitInput ----------------------------------------------------------- */

.sc-submit-input {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
}

.sc-submit-input__field {
    flex: 1 1 200px;
    min-height: 40px; /* 40-px touch target baseline */
    box-sizing: border-box;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
}

.sc-submit-input__field:disabled {
    background-color: var(--rz-input-disabled-background-color, #f5f5f5);
    color: var(--rz-input-disabled-color, #999);
    cursor: not-allowed;
}

.sc-submit-input__button {
    min-height: 40px;
}

.sc-submit-input__clear {
    min-height: 40px;
    min-width: 40px;
    /* De-emphasised vs. the primary submit button — sits between the input
       (or ExtraControls) and the submit. */
}

/* Suppress the browser's native clear-X on <input type="search"> so that
   when InputType="search" is combined with ShowClearButton=true we don't
   render two side-by-side clear affordances. */
.sc-submit-input__field[type="search"]::-webkit-search-cancel-button {
    display: none;
}

/* -- SearchableListPanel --------------------------------------------------- */

.sc-searchable-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    height: 100%;
    min-height: 0; /* allows flex children to shrink in a height-constrained parent */
}

.sc-searchable-list__bar {
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--rz-base-background-color, #fff);
    padding-block: 0.25rem;
}

.sc-searchable-list__results {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
}

.sc-searchable-list__empty {
    padding: 1rem;
    color: var(--rz-text-tertiary-color, #6c757d);
    text-align: center;
}
