.form {
    --grey-50: hsl(189, 47%, 97%);

    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 45%;
    height: 100%;
}

.form label, .form p {
    font-size: 14px;
    font-weight: 700;
    color: var(--grey-500);
}

.input-container {
    position: relative;
    height: 40px;
    margin-top: 8px;
    border: 2px solid transparent;
    border-radius: 4px;
    transition: border-color .2s ease-in;
}

.input-container img {
    position: absolute;
    width: 10px; 
    height: auto;
    left: 16px; 
    top: 50%;
    transform: translateY(-50%);
}

.input-container input {
    width: 100%;
    height: 100%;
    padding: 16px;
    border-radius: inherit;
    font-family: var(--main-font);
    font-size: 18px;
    font-weight: 700;
    text-align: right;
    color: var(--green-900);
    background-color: var(--grey-50);
}

.input-container input::placeholder {
    color: var(--grey-400);
}

/* Valid input */
.valid:hover {
    border-color: var(--green-400);
}

/* Empty input (zero) */
.invalid, .error {
    border-color: tomato;
}

.error::after {
    content: "Can't be zero";
    position: absolute;
    width: fit-content;
    height: 20px;
    right: 10px;
    bottom: calc(100% + 5px); 
    font-family: var(--main-font);
    font-size: 14px;
    font-weight: 700;
    color: tomato;
}

.tip-selector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    grid-auto-rows: 40px;
    gap: 12px;
    margin-top: 12px;
}

.option {
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 4px;
    font-size: 18px;
    font-weight: 700;
    color: white;
    background-color: var(--green-900);
    cursor: pointer;
    transition: all .2s ease-in;
}

.option:hover {
    color: var(--green-900);
    background-color: var(--green-200);
}

.selected {
    color: var(--green-900);
    background-color: var(--green-400);
}

.tip-selector .invalid {
    border-color: tomato;
}

.custom  {
    border: 2px solid transparent;
    border-radius: 4px;
    transition: border-color .2s ease-in;
}

.custom input {
    width: 100%;
    height: 100%;
    padding: 14px;
    border-radius: inherit;
    font-family: var(--main-font);
    font-size: 18px;
    font-weight: 700;
    text-align: right;
    color: var(--green-900);
    background-color: var(--grey-50);
}

.custom input::placeholder {
    text-align: left;
    color: var(--grey-400);
}

/* Media queries */
@media screen and (max-width: 850px) {
    .form {
        width: 100%;
        height: 400px;
    }
}

@media screen and (max-width: 400px) {
    .form {
        width: 100%;
        height: 375px;
    }
}