.form .form_input_item > div {
    border: 1px solid #3a4b77;
    border-radius: 4px;
    position: relative;
    margin-top: 15px;
}
.form > .form_input_item:first-child {
    margin-top: 30px;
}

.form h4 {
    position: absolute;
    top: -15px;
    left: 5px;
    background-color: white;
    padding: 0 5px;
    margin: 0;
    font-size: 15px;
    font-weight: normal;
    color: #3a4b77;
}

.form input, .form textarea {
    border: none;
    width: calc(100% - 40px);
    padding: 15px 20px 10px 20px;
    border-radius: 4px;
}

/* Input dropdown | select */
.form select {
    border: none;
    width: calc(100% - 20px);
    padding: 15px 20px 10px 20px;
    background-color: transparent;
    cursor: pointer;
}
.form hr {
    width: 20px;
    margin: 20px auto;
}

/* Form workable icons: */
.form .work {
    position: absolute;
    top: -15px;
    right: 5px;
    margin: 0;
    font-size: 20px;
    color: slategrey;
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-end;
}
.form .work > div {
    background-color: white;
    padding: 0 5px;
    margin: 0 7px;
}
.form .work > div a:hover, .form .work > div:hover {
    color: black;
}

/* Form flex: */
.form_flex {
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-start;
    align-items: stretch;
}
.form_flex > div:first-child {
    margin-right: 10px;
}
.form_flex > div {
    max-width: 50%;
}

/* text before and after input: */
.form_input_item_text_beforeafter {
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-start;
    align-content: flex-start;
}
.form_text_beforebehind {
    border: none !important;
    padding: 13px 10px;
}

/* Input type=color */
input[type="color"] {
    background-color: transparent;
    width: 100px;
    height: 50px;
    cursor: pointer;
}
.form_input_item > div:has(input[type="color"])  {
    width: 100px;
}
/* Input type=dropdown */
.form select {
    height: 53px;
}
/* Input type=date, type=number */
input[type="date"], input[type="number"] {
    max-width: 180px;
    cursor: pointer;
}
input[type="file"] {
    cursor: pointer;
}
input[type="file"]::file-selector-button {
    background: #e0e8ff;
    border: 1px solid #3a4b77;
    border-radius: 4px;
    padding: 5px 10px;
}
input[type="file"]::file-selector-button:hover {
    background: #98b5ff63;
}
.form_input_item > div:has(input[type="date"]), .form_input_item > div:has(input[type="number"])  {
    width: 200px;
}
.form img {
    color: grey;
    font-size: 15px;
}
/* For Safari: */
input[type="date"]::-webkit-datetime-edit {
     line-height: 1;
     padding: 0;
     margin-bottom: -2px; /* Adjust as needed for precise alignment */
 }
/* Input type=time */
input[type="time"] {
    max-width: 80px;
    cursor: pointer;
}
/* Input type=hidden */
.form_input_item > div:has(input[type="time"])  {
    width: 110px;
}
/* Input type=textarea */
textarea {
    min-height: 100px;
    resize: vertical;
    cursor: text;
}
/* Input type=submit */
input[type="submit"] {
    width: 100%;
    background: #e0e8ff;
    cursor: pointer;
}
input[type="submit"]:hover {
    background: #d8e1ff;
}
.form_input_item > div:has(input[type="submit"])  {
    margin-bottom: 10px;
}

/* Input: checkbox
<div class="form_checkbox"><label>One<input type="checkbox" checked="checked"><span class="checkmark"></span></label></div>
<div class="form_checkbox"><label>Two<input type="checkbox" checked="checked"><span class="checkmark"></span></label></div>
*/
.form_input_item > div:has(input[type="checkbox"])  { /* no border */
    border: none;
}
.form_checkbox > label { /* The container */
    display: block;
    position: relative;
    padding-left: 35px;
    margin-bottom: 12px;
    cursor: pointer;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}
.form_checkbox input { /* Hide the browser's default checkbox */
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0 !important;
}
.form_checkbox span { /* Create a custom checkbox */
    position: absolute;
    top: 0;
    left: 0;
    height: 25px;
    width: 25px;
    background-color: #eee;
    border: 1px solid #3a4b77;
    border-radius: 4px;
}
.form_checkbox > label:hover input ~ .checkmark { /* On mouse-over, add a grey background color */
    background-color: #e0e8ff;
}
.form_checkbox > label input:checked ~ .checkmark { /* When the checkbox is checked, add a blue background */
    background-color: #384975;
}
.form_checkbox .checkmark:after { /* Create the checkmark/indicator (hidden when not checked) */
    content: "";
    position: absolute;
    display: none;
}
.form_checkbox input:checked ~ .checkmark:after { /* Show the checkmark when checked */
    display: block;
}
.form_checkbox .checkmark:after { /* Style the checkmark/indicator */
    left: 8px;
    top: 4px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 3px 3px 0;
    -webkit-transform: rotate(45deg);
    -ms-transform: rotate(45deg);
    transform: rotate(45deg);
}

/* Form raido:
<div class="form_radio"><label>One<input type="radio" checked="checked" name="radio"><span class="checkmark"></span></label></div>
<div class="form_radio"><label>Two<input type="radio" name="radio"><span class="checkmark"></span></label></div>
*/
.form_radio {
    padding: 20px;
}
.form_radio > label { /* The container */
    display: block;
    position: relative;
    padding-left: 35px;
    margin-bottom: 12px;
    cursor: pointer;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    font-size: 16px;
}
.form_radio input { /* Hide the browser's default radio button */
    position: absolute;
    opacity: 0;
    cursor: pointer;
    width: 0 !important;
}
.form_radio .checkmark { /* Create a custom radio button */
    position: absolute;
    top: 5px;
    left: 0;
    height: 21px;
    width: 21px;
    background-color: #eee;
    border-radius: 50%;
    border: 1px solid #384975;
}
.form_radio:hover input ~ .checkmark { /* On mouse-over, add a grey background color */
    background-color: #e0e8ff;
}
.form_radio input:checked ~ .checkmark { /* When the radio button is checked, add a blue background */
    background-color: #384975;
}
.form_radio .checkmark:after { /* Create the indicator (the dot/circle - hidden when not checked) */
    content: "";
    position: absolute;
    display: none;
}
.form_radio input:checked ~ .checkmark:after { /* Show the indicator (dot/circle) when checked */
    display: block;
}
.form_radio .checkmark:after { /* Style the indicator (dot/circle) */
    top: 6px;
    left: 6px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: white;
}
.form_radio label:last-child {
    margin-bottom: 0;
}

