/* 申込状況一覧を基準にした、Web画面共通の入力部品。 */
:root {
    --app-control-height: 34px;
    --app-control-border: #cbd2d9;
    --app-control-focus: #4d86c6;
    --app-control-radius: 0.25rem;
}

body.app-tables .form-control,
body.app-tables .custom-select,
body.app-tables .select-custom {
    height: var(--app-control-height);
    min-width: 0;
    padding: 0.25rem 0.55rem;
    border: 1px solid var(--app-control-border);
    border-radius: var(--app-control-radius);
    background-color: #fff;
    color: #263746;
}

body.app-tables .form-control::placeholder {
    color: #98a3ad;
}

body.app-tables textarea.form-control,
body.app-tables select.form-control[multiple],
body.app-tables select.form-control[size]:not([size="1"]),
body.app-tables input.form-control[type="file"] {
    height: auto;
    min-height: var(--app-control-height);
}

.app-tables .select2-container .select2-selection {
    min-height: var(--app-control-height) !important;
    border: 1px solid var(--app-control-border);
    border-radius: var(--app-control-radius);
    background-color: #fff;
    color: #263746;
}

.app-tables .select2-container .select2-selection--single {
    height: var(--app-control-height) !important;
    position: relative;
}

.app-tables .select2-container .select2-selection--single .select2-selection__rendered {
    line-height: calc(var(--app-control-height) - 2px);
    padding-left: 0.55rem;
    padding-right: 1.5rem;
    color: #263746;
}

.app-tables .select2-container .select2-selection--single .select2-selection__arrow {
    position: absolute;
    top: 0;
    right: 1px;
    width: 24px;
    height: 100%;
}

.app-tables .select2-container .select2-selection--single .select2-selection__arrow b {
    top: 50%;
    left: 50%;
    margin-top: -2px;
    margin-left: -4px;
}

.app-tables .select2-container .select2-selection--multiple {
    height: auto;
}

.app-tables .select2-container .select2-selection--multiple .select2-selection__choice {
    margin-top: 4px;
}

.app-tables .select2-container .select2-selection--multiple .select2-search__field {
    margin-top: 4px;
}

/* 付属アイコンやボタンも入力欄の高さに合わせる。 */
.app-tables .input-group > .input-group-prepend > .input-group-text,
.app-tables .input-group > .input-group-append > .input-group-text,
.app-tables .input-group > .input-group-append > .btn,
.app-tables .input-group > .input-group-prepend > .btn {
    height: var(--app-control-height);
    padding-block: 0.25rem;
}

body.app-tables .form-control:focus,
body.app-tables .custom-select:focus,
body.app-tables .select-custom:focus,
.app-tables .select2-container--focus .select2-selection,
.app-tables .select2-container--open .select2-selection {
    border-color: var(--app-control-focus) !important;
    outline: 0;
    box-shadow: 0 0 0 0.12rem rgba(0, 83, 179, 0.14);
}

body.app-tables .form-control:disabled,
body.app-tables .form-control[readonly],
body.app-tables .custom-select:disabled,
.app-tables .select2-container--disabled .select2-selection {
    background-color: #e9ecef;
}

/* 入力エラーの赤枠は維持する。 */
body.app-tables .form-control.is-invalid,
body.app-tables .custom-select.is-invalid {
    border-color: #dc3545 !important;
}

/* 単一選択の標準selectも、Select2と同じ塗りつぶしの矢印に統一する。 */
body.app-tables select:not([multiple]):not([size]):not(.select2-hidden-accessible),
body.app-tables select[size="1"]:not([multiple]):not(.select2-hidden-accessible) {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 26px !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='5' viewBox='0 0 8 5'%3E%3Cpath fill='%23343a40' d='M0 0h8L4 5z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 10px center !important;
    background-size: 8px 5px !important;
}
