form, .form {
    margin: 1.5rem 0;
}

.phone, .state {
    display: flex;
}

.phone label:first-of-type {
    max-width: 25%;
    min-width: 50px;
    margin-right: 10px;
}

.state label:last-of-type {
    max-width: 25%;
    min-width: 50px;
    margin-left: 10px;
}

.form-row, .form-controls {
    display: grid;
    grid-gap: 20px;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.form-controls {
    justify-items: end;
}

label {
    font-size: 0.75rem;
    /* color: white; */
    /* padding: 10px; */
    font-weight: 500;
    text-transform: uppercase;
    /* font-style: italic; */
    /* margin-top: 0.5rem; */
    display: block;
    width: 100%;
    position: relative;
}

/* @media (min-width: 512px) {
    .label {
        font-size: 0.8rem;
    }
} */

select, select option, select:focus, input, textarea, textarea:focus {
    color: #e7e7e7;
    padding: 5px;
    background-color: rgba(255, 255, 255, 0.1);
    border: none;
    border-bottom: 1px solid #e7e7e7;
    font-family: 'Josefin Sans', sans-serif;
    /* font-weight: 300; */
    font-size: 1.2rem;
    letter-spacing: 0.05rem;
    margin: 0 0 0.8rem 0;
    outline: none;
    width: 100%;
    resize: none;
    transition: 0.3s ease-in;
    font-display: swap;
}

/* @media (max-width: 1115px) {
	select, select:focus, input, input:focus, textarea, textarea:focus {
		width: 97%;
	}
} */

input::placeholder {
    opacity: 0.8;
    color: darkgrey;
    font-style: italic;
}

select {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-repeat: no-repeat;
    background-size: 0.5em auto;
    background-position: right 0.25em center;
    padding-right: 1em;
    background-image: url("data:image/svg+xml;	charset=utf-8, <svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 40'> <polygon points='0,0 60,0 30,40'style='fill:slategrey;'/></svg>");
}

select:hover, select:focus {
    background-color: #e7e7e7;
}

select option {
    background: #e7e7e7;
}

/* For IE <= 11 */

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

textarea, textarea:focus {
    line-height: 4ch;
    /* background-image: linear-gradient(transparent, transparent calc(4ch - 2px), #e7eff8 0px); */
    /* background-size: 100% 4ch; */
    border: none;
    padding: 0 5px;
}

.input-group {
    display: flex;
    position: relative;
    width: 100%;
}

.input-group .label {
    font-size: 0.7rem;
    position: absolute;
    bottom: -18%;
    left: 0.5rem;
}

.input-group .text-label {
    bottom: -10%;
}

.error, .success {
    font-size: 0.8rem;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 25px;
    /*border-radius: 0 0 15px 15px;
	*/
}

button {
    border: none;
    background-color: transparent;
}

button:disabled {
    cursor: not-allowed;
    border-bottom: 5px solid gray;
}

.button {
    color: #e7e7e7;
    cursor: pointer;
    user-select: none;
    padding: 8px 24px 3px 10px;
    position: relative;
    margin-top: 1rem;
    font-size: 1.3rem;
    width: fit-content;
    border-bottom: 5px solid #e7e7e7;
}

.button::before {
    content: url('/img/navigate_next_black_24dp.svg');
    /* border-bottom: 1px solid black; */
    color: darkred;
    position: absolute;
    top: 7px;
    right: 5px;
}

.button:hover::before {
    animation: 0.3s cubic-bezier(0.5, 0.2, 0.15, 1) infinite alternate both button-icon-slide;
}

@keyframes button-icon-slide {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(5px);
    }
}

.button:hover {
    border-bottom: 5px solid darkred;
}



button:disabled, button:hover:disabled  {
    cursor: not-allowed;
    border-bottom: 5px solid gray;
}

.invalid {
    border-color: #8c0000;
}

.invalid+.validate-icon {
    content: url('/img/error_white_24dp.svg');
    position: absolute;
    margin: 5px;
    right: 0;
    opacity: 1;
    /* z-index: -1; */
}

.valid {
    border-color: #008c00;
}