components/input/Input.module.scss
@use '/app/scss/mixins.scss' as *;
.wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;

    --valid-color: red;
}

.label {
    margin-left: 12px;
    @include font-default;
    font-weight: 600;
}

.input {
    width: 100%;
    border-radius: 10rem;
    background-color: var(--input-bg);
    border: 1.7px solid var(--input-border-color);
    padding: 12px 20px;
    font-size: 1.5rem;
    font-weight: 400;
    font-family: var(--font-family);
    outline: none;
    transition: border-color 0.2s ease-in-out;

    &:focus {
        border-color: var(--input-border-focus-color);
    }
}

.input.error-input {
    border-color: var(--valid-color);
}

.textarea {
    max-width: 100%;
    height: 100px;
    border-radius: 12px;
    font-size: 1.5rem;

    &:focus {
        border-color: var(--input-border-focus-color);
    }
}

.code-input-wrapper {
    width: 100%;
    --valid-color: red;

    .input-wrap {
        width: 100%;
        background-color: var(--input-bg);
        border: 1.7px solid var(--input-border-color);
        display: flex;
        border-radius: 10rem;
        margin-bottom: 12px;
    }

    .input-wrap.error-input {
        border-color: var(--valid-color);
    }

    .code-input {
        flex: 1;
        width: 100%;
        padding: 12px 20px;
        font-size: 1.6rem;
        font-weight: 400;
        border-radius: 10rem;
        border: none;
        outline: none;
        background-color: transparent;
    }

    .code-input::-webkit-outer-spin-button,
    .code-input::-webkit-inner-spin-button {
        -webkit-appearance: none;
        margin: 0;
    }

    .code-input[type='number'] {
        -moz-appearance: textfield;
    }

    .code-send-btn {
        max-width: 120px;
        min-width: 100px;
        width: 100%;
        border: none;
        width: 100%;
        margin: 1px;
        background-image: var(--code-input-bg);
        border-radius: 10rem;
        font-weight: 500;
        font-size: 1.4rem;
        font-family: var(--font-family);
        text-align: center;
        display: flex;
        justify-content: center;
        align-items: center;
        cursor: pointer;
    }

    .code-send-btn:hover {
        opacity: 0.8;
    }

    .code-send-btn[disabled] {
        background-color: var(--code-input-disable-bg);
        cursor: no-drop;
        opacity: 1;
    }
}

.focusBorder {
    border-color: var(--input-border-focus-color);
}

.disable {
    background-color: var(--input-border-color);
    opacity: 0.8;

    .code-send-btn {
        background-image: unset;
        background-color: var(--code-input-disable-bg);
        opacity: 0.8;
    }

    .code-send-btn {
        cursor: no-drop;
    }
}

.password-field {
    position: relative;
    width: 100%;

    .login-input {
        width: 100%;
        padding-right: 40px;
        margin-bottom: 0;
    }

    .toggle-password {
        position: absolute;
        right: 12px;
        top: 50%;
        transform: translateY(-50%);
        background: none;
        border: none;
        cursor: pointer;
        padding: 5px;
        display: flex;
        align-items: center;
        color: var(--text-color);
        opacity: 0.7;
        transition: opacity 0.3s ease;

        &:hover {
            opacity: 1;
        }

        svg {
            width: 18px;
            height: 18px;
        }
    }
}

.error-message {
    @include font-default;
    color: var(--valid-color);
    font-weight: 500;
    margin-left: 8px;
}
