input.input,
textarea.input,
select.input {
    border: 1.5px solid rgb(206, 207, 206);
    border-radius: 10px;
    display: flex;
    align-items: center;
    padding-left: 10px;
    padding-right: 10px;
    transition: 0.04s all ease-in-out;
    background: transparent;
}

input.input,
select.input {
    min-height: 50px;
}

textarea.input {
    resize: none;
}

input.input[data-type='money'] {
    text-align: end;
}

input.input[data-type='money'][data-align='start'] {
    text-align: start;
}

input.input[data-type='money']::placeholder {
    text-align: start;
}

input.input::selection,
input.input[type='date']::selection,
textarea.input::selection {
    color: white;
    background-color: var(--cheung-light-color);
}

[data-theme='dark'] input.input::selection,
[data-theme='dark'] input.input[type='date']::selection,
[data-theme='dark'] textarea.input::selection {
    color: var(--color-app-primary);
    background-color: var(--color-onAppPrimary);
}

/* input.input[type='date']::-webkit-datetime-edit {
    color: rgb(200, 200, 200);
} */

input.input[type='date'] {
    appearance: none;
    background-image: var(--icon-calendar);
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 24px 24px;
    position: relative;
    box-sizing: border-box;
}

/* input[type='date']::-webkit-inner-spin-button, */
input.input[type='date']::-webkit-calendar-picker-indicator {
    background: transparent;
    color: transparent;
    cursor: pointer;
    position: absolute;
    width: 24px;
    height: 24px;
    right: 10px;
    top: 50%;
    transform: translate(0, -50%);
}

div.form-control {
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    position: relative;
}

div.form-control input.input[data-adornment-start='true'] {
    padding-left: 30px;
}

div.form-control input.input[data-adornment-end='true'] {
    padding-right: 30px;
}

div.form-control .adornment {
    position: absolute;
}

div.form-control .adornment[data-position='end'] {
    right: 0;
    padding-right: 10px;
    z-index: 2;
}

div.form-control .adornment[data-position='start'] {
    left: 0;
    padding-left: 10px;
    z-index: 2;
}

div.form-control .adornment button {
    all: unset;
    cursor: pointer;
}

div.input-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

select.input {
    appearance: none;
    background-image: var(--select-arrow);
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 16px;
}

select.input::-ms-expand {
    display: none;
}

input.input:focus-within,
textarea.input:focus-within,
select.input:focus-within {
    border: 1px solid transparent;
    outline: 2px solid var(--cheung-color);
}

[data-theme='dark'] input.input:focus-within,
[data-theme='dark'] textarea.input:focus-within,
[data-theme='dark'] select.input:focus-within {
    outline-color: var(--color-onAppPrimary);
}

input.input.error,
textarea.input.error,
select.input.error {
    border: 1px solid red;
    outline: 1px solid red;
}

input.input.error:focus-within,
textarea.input.error:focus-within,
select.input.error:focus-within {
    border: 1px solid red;
    outline: 1.5px solid red;
}

input.input[data-size='small'],
select.input[data-size='small'] {
    max-height: 35px;
}

div.checkbox-container,
div.checkbox-container label {
    position: relative;
    display: inline-block;
}

/* Input */
div.checkbox-container label > input {
    appearance: none;
    -moz-appearance: none;
    -webkit-appearance: none;
    z-index: -1;
    position: absolute;
    left: -10px;
    top: -8px;
    display: block;
    margin: 0;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    background-color: rgba(0, 0, 0, 0.6);
    box-shadow: none;
    outline: none;
    opacity: 0;
    transform: scale(1);
    pointer-events: none;
    transition: opacity 0.3s, transform 0.2s;
}

/* Span */
div.checkbox-container label > span {
    display: inline-block;
    width: 100%;
    cursor: pointer;
}

/* Box */
div.checkbox-container label > span::before {
    content: '';
    display: inline-block;
    box-sizing: border-box;
    margin: 3px 11px 3px 1px;
    border: solid 2px;
    /* Safari */
    border-color: rgba(0, 0, 0, 0.6);
    border-radius: 2px;
    width: 18px;
    height: 18px;
    vertical-align: top;
    transition: border-color 0.2s, background-color 0.2s;
}

/* Checkmark */
div.checkbox-container label > span::after {
    content: '';
    display: block;
    position: absolute;
    top: 4px;
    left: 2px;
    width: 10px;
    height: 5px;
    border: solid 2px transparent;
    border-right: none;
    border-top: none;
    transform: translate(3px, 4px) rotate(-45deg);
}

/* Checked, Indeterminate */
div.checkbox-container label > input:checked,
div.checkbox-container label > input:indeterminate {
    background-color: var(--cheung-color);
}

div.checkbox-container label > input:checked + span::before,
div.checkbox-container label > input:indeterminate + span::before {
    border-color: var(--cheung-color);
    background-color: var(--cheung-color);
}

div.checkbox-container label > input:checked + span::after,
div.checkbox-container label > input:indeterminate + span::after {
    border-color: #fff;
}

div.checkbox-container label > input:indeterminate + span::after {
    border-left: none;
    transform: translate(4px, 3px);
}

/* Hover, Focus */
div.checkbox-container label:hover > input {
    opacity: 0.04;
}

div.checkbox-container label > input:focus {
    opacity: 0.12;
}

div.checkbox-container label:hover > input:focus {
    opacity: 0.16;
}

/* Active */
div.checkbox-container label > input:active {
    opacity: 1;
    transform: scale(0);
    transition: transform 0s, opacity 0s;
}

div.checkbox-container label > input:active + span::before {
    border-color: #85b8b7;
}

div.checkbox-container label > input:checked:active + span::before {
    border-color: transparent;
    background-color: rgba(0, 0, 0, 0.6);
}

/* Disabled */
div.checkbox-container label > input:disabled {
    opacity: 0;
}

div.checkbox-container label > input:disabled + span {
    color: rgba(0, 0, 0, 0.38);
    cursor: initial;
}

div.checkbox-container label > input:disabled + span::before {
    border-color: currentColor;
}

div.checkbox-container label > input:checked:disabled + span::before,
div.checkbox-container label > input:indeterminate:disabled + span::before {
    border-color: transparent;
    background-color: currentColor;
}
