/* Shared compact form density. Keep specialized widgets, multiline fields and explicit size variants flexible. */
:root {
    --sc-control-height: 38px;
    --sc-control-radius: 10px;
    --sc-control-padding-x: 12px;
    --sc-control-font-size: 14px;
}
@media (max-width: 767px) {
    :root {
        --sc-control-height: 44px;
        --sc-control-font-size: 16px;
    }
}
input.form-control:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]):not([type="color"]):not(.form-control-lg):not(.form-control-sm),
select.form-control:not([multiple]):not(.form-control-lg):not(.form-control-sm),
.custom-select:not([multiple]):not(.custom-select-lg):not(.custom-select-sm) {
    box-sizing: border-box;
    height: var(--sc-control-height);
    min-height: var(--sc-control-height);
    padding-block: 5px;
    padding-inline-start: var(--sc-control-padding-x);
    font-size: var(--sc-control-font-size);
    line-height: 1.4;
    border-radius: var(--sc-control-radius);
}
textarea.form-control {
    padding: 8px var(--sc-control-padding-x);
    font-size: var(--sc-control-font-size);
    border-radius: var(--sc-control-radius);
}
.input-group { align-items: stretch; }
.input-group > .input-group-prepend { display: flex; }
.input-group > .input-group-prepend > .input-group-text,
.input-group > .input-group-prepend > .btn,
.input-group > .input-group-append > .input-group-text,
.input-group > .input-group-append > .btn {
    box-sizing: border-box;
    display: inline-flex;
    width: auto;
    min-width: var(--sc-control-height);
    align-items: center;
    justify-content: center;
    padding-inline: 6px;
}
.input-group > .form-control:not(:first-child),
.input-group > .custom-select:not(:first-child) {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}
.input-group > .form-control:not(:last-child),
.input-group > .custom-select:not(:last-child) {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}
.select2-container--default .select2-selection--single {
    box-sizing: border-box;
    display: flex;
    height: var(--sc-control-height);
    min-height: var(--sc-control-height);
    align-items: center;
    border-radius: var(--sc-control-radius);
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
    flex: 1 1 auto;
    min-width: 0;
    padding-block: 0;
    font-size: var(--sc-control-font-size);
    line-height: calc(var(--sc-control-height) - 2px);
}
.select2-container--default .select2-selection--single .select2-selection__clear {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    float: right;
    cursor: pointer;
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
    z-index: 1;
    height: calc(var(--sc-control-height) - 2px);
}
.select2-container--default .select2-selection--multiple {
    min-height: var(--sc-control-height);
    height: auto;
    border-radius: var(--sc-control-radius);
}
/* Keep the integrated catalog search button and input at the same height. */
.sc-classes-page .top-search-categories-form .search-input .form-control,
.sc-classes-page .top-search-categories-form .search-input .btn {
    height: var(--sc-control-height);
    min-height: var(--sc-control-height);
}
