input,
button,
select,
textarea {
    font:inherit;
    font-size: 1.7rem;
    border: none;
}

textarea::spelling-error {
     Change the color of the wavy underline 
    text-decoration-color: red; 
    text-decoration: underline dashed red 3px;  
}

form {
    display: grid;
    gap:2rem;

    @media (width > 720px) {
        grid-template-columns: 1fr 1fr;
    }
}

.form-group {
    display: grid;
}

label {
    text-transform: uppercase;
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 5px;
}

label:has(+ input:required):after,
label:has(+ textarea:required):after {
    content: ' *'; /* Add a space before the asterisk for better spacing */
    font-weight: bold;
    color: red; /* Customize the color of the asterisk */
}
            
input,textarea{
    background-color: rgba(166, 188, 234, 0.705);
    background-color:#E6E6E6;
    color: black;
    border-radius: .6em;
    padding:1ex 2ex;
    width: 100%;
}
input:-webkit-autofill {
    background-color:white;
}

#vital {
    display: none;
}

textarea{
    height:8rem;
}

input:focus, select:focus {
  outline: 1px solid blue;
  border-color: #4CAF50; /* Changes the border color to green on focus */
  
}

div.form-group:has(textarea) {
    grid-column: 1 / -1;
}

input[type="submit"],
button[type="submit"] {
    background-color:rgba(40, 104, 164,.8);
    color: white;
    padding: 10px 20px;
    border: none;
    cursor: pointer;
}
input[type="submit"]:hover,
button[type="submit"]:hover {
    background-color:rgba(40, 104, 164,1);
}



.radio-group {
    display: flex;
    align-items: center;
    margin-left:1.5rem;
    margin-bottom: 10px;

    input {
        width:2rem;
        height:2rem;
        cursor: pointer;
    }
    label {
        align-items: center;
        font-size: 1.2rem;
        cursor: pointer;
    }
}

input[type="radio"]:focus {
    outline: none;
}

.radio-group input {
    margin-right: .5rem;
}

div.form-group:has(input[type=radio]) {
    align-items: flex-end;
}



button[type="submit"].loading {
    
    background-color:rgba(40, 104, 164,.8);
    color: white;
    padding: 10px 20px;
    border: none;
    cursor: not-allowed;
}

/* Hide the text when loading */
button[type="submit"].loading .btn-text {
  display: none;
}

/* Loader styling (initially hidden) */
.loader {
    
  display: none;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top: 4px solid #fff; /* The "spinning" part */
  border-radius: 50%;
  width: 1.7rem;
  height: 1.7rem;
  align-items: center;
  animation: spin 1s linear infinite; /* Apply the spin animation */
}

/* Show the loader when the loading class is active */
button[type="submit"].loading .loader {
  display: block;
}

/* Keyframe animation for the spinner */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}



.footnote {
    font-size: .9rem;
    text-align: right;
}
.footnote::before {
    content: '* '; /* Add a space before the asterisk for better spacing */
    font-weight: bold;
    color: red; /* Customize the color of the asterisk */
}