/* group - bootstrap */
.form-group {
    margin-bottom: 1rem;
}

/* label - bootstrap */
.form-label {
    margin-bottom: .25rem;
}
.form-check label span {
    display: block;
    font-weight: normal;
    font-size: .9rem;
}

/* error message - bootstrap */
.invalid-feedback {
    margin-top: 0.5rem;
}

/* input - bootstrap */
.form-control {
    /*height: calc(1.5em + 1rem + 2px);
    padding: .5rem .75rem;*/
}
.form-control:focus {
    border-color: var(--bs-gray-400);
    box-shadow: 0 0 0 0.2rem rgb(206 212 218 / 25%);
}
.form-control.others {
    display: none;
}
select.form-control:not([size]):not([multiple]) {
    line-height: 1.5;
}
select.form-control {
    padding: .5rem 2.25rem .5rem 0.75rem !important;
    -moz-padding-start: calc(0.75rem - 3px);
    background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/></svg>");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}
input[type=file] {
    height: auto;
    padding: .375rem .75rem;
}

/* color input */
input[type="color"] {
    -webkit-appearance: none;
    width: 37px;
    height: 37px;
    padding: 0 !important;
    overflow: hidden;
}
input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}
input[type="color"]::-webkit-color-swatch {
    border: none;
}

/* image as radio button */
.custom-radio-visual {
    display: inline-block;
}
.custom-radio-visual [type=radio] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.custom-radio-visual [type=radio] + label {
    width: 40px;
    height: 40px;
    margin: 0;
    padding: 10px;
    color: #87929e;
    cursor: pointer;
}
.custom-radio-visual [type=radio] + label [class*='fa-'],
.custom-radio-visual [type=radio] + label [class*='icon-'] {
    width: 20px;
    height: 20px;
    font-size: 20px;
}
.custom-radio-visual [type=radio]:checked + label {
    border-radius: 50%;
    background-color: #e8ebed;
    color: var(--bs-gray-800);
}

/* switch for checkbox */
form .switch label {
    margin: 0;
}
form .switch {
    position: relative;
    display: inline-block;
    padding-left: 48px;
}
form .switch input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
form .switch .slider {
    width: 40px;
    height: 20px;
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #87929e;
    transition: .4s;
}
form .switch .slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: #fff;
    transition: .4s;
}
form .switch input:checked + .slider {
    background-color: #4FC47E;
}
form .switch input:focus + .slider {
    box-shadow: 0 0 0 0.2rem rgb(206 212 218 / 25%);
}
form .switch input:checked + .slider:before {
    -webkit-transform: translateX(20px);
    -ms-transform: translateX(20px);
    transform: translateX(20px);
}
form .switch .slider.round {
    border-radius: 20px;
}
form .switch .slider.round:before {
    border-radius: 50%;
}
form .switch .toggle {
    display: inline-block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}
form .switch .description,
form .switch .invalid-feedback {
    font-weight: 400;
}

/* file input button */
form .file-input {
    width: 100%;
    overflow: hidden;
    position: relative;
}
form .file-input > input[type="file"] {
    font-size: 200px;
    position: absolute;
    top: 0;
    right: 0;
    opacity: 0;
    cursor: pointer;
}
form .file-input > .btn-file-input {
    display: inline-block;
    border-color: var(--bs-gray-200);
    background-color: var(--bs-gray-200);
    color: var(--bs-gray-800);
    white-space: normal;
    overflow-wrap: break-word;
}
form .file-input > .btn-file-input.is-invalid {
    border-color: #f8d7da;
    background-color: #f8d7da;
    color: #721c24;
}
form .file-input:hover > .btn-file-input:not(.is-invalid) {
    border-color: var(--bs-gray-300);
    background-color: var(--bs-gray-300);
}

/* file upload preview */
form .preview {
    width: 100%;
    margin-bottom: 0.5rem;
    border: 1px dashed var(--bs-gray-400);
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
}
form .preview .empty [class*='fa-'] {
    margin-bottom: 1rem;
    width: 2.5rem;
    height: 2.5rem;
    font-size: 2.5rem;
    color: var(--bs-gray-300);
}
form .preview .btn-delete {
    display: none;
    line-height: 1;
    padding: 6px 6px;
    background-color: rgba(52,58,64,0.6);
    color: #fff;
    border: 0;
}
form .preview .btn-delete [class*='fa-'] {
    margin: 0;
}
form .preview .btn-delete .loader {
    margin-right: 5px;
}
form .preview .btn-delete:hover {
    background-color: rgba(52,58,64,0.8);
    color: #fff;
}

/* autosuggest */
.form-group div.selected {
    padding: .5rem .75rem !important;
}

/* drag and drop to sort input */
.list-group.with-handle .list-group-item {
    padding-left: 0;
}
.list-group.with-handle .list-group-item .sort-handle {
    padding: 0.75rem;
    color: #87929e;
}