/**
 * CSS for forms
 *
 * Use these classes:
 * .form-container - container for the form with optional header
 * .form - the main form element
 * .line - a single line in the form usually containing a label and an input
 * .checkbox
 */

.form-container {
    width: 60vw;
    min-width: 300px;
    margin: 16px auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
}

.form-container header {
    width: 100%;
    font-size: 1.5em;
    font-weight: bold;
    text-align: left;
    margin: 8px 0;
    border-bottom: solid 2px var(--black-darker);
}

.form-container > .links {
    width: 100%;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.links * {
    margin: auto;
    padding: 4px;
}

.line {
    width: 100%;
    height: auto;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

.line > * {
    margin: 2px;
    padding: 4px;
    border-radius: 4px;
}

.line div.input {
    padding: 0;
    height: 100%;
}

input, input.checkbox, select, .select2 {
    border: solid 1px var(--black-lighter);
}

.line label {
    width: 30%;
    text-align: right;
}

.line input, .line .input, .line select, .line .select2 {
    width: 70%;
}

.line-submit {
    display: flex;
    justify-content: flex-end;
}

.line-submit input.btn {
    cursor: pointer;
    background-color: var(--green);
    width: 30%;
}

.line input.checkbox {
    height: 25px;
    width: 25px;
    cursor: pointer;
    vertical-align: middle;
}

div.errors {
    color: var(--red);
}

form.sbf .line-submit input.btn {
    width: 100%;
}

input.btn, div.form a.btn {
    border-radius: 4px;
    padding: 2px 8px;
    margin: 4px;
}
