/**
 * Form Component
 * Form input styles and layout
 */

form {
    display: flex;
    flex-direction: column;
    clear: both;
    margin-bottom: var(--spacing-3);
}

form > div:not(.actions) {
    display: flex;
    flex-direction: column;
    margin-bottom: var(--spacing-4);
}

label {
    display: flex;
    clear: both;
}

input, textarea, select {
    display: block;
    clear: both;
    width: 100%;
}

input, textarea, select, .quill {
    background-color: var(--color-bg);
    color: var(--color-text);
    border: 1px solid var(--color-primary);
    border-radius: 0;  /* Sharp edges */
}

input, textarea, select {
    padding: var(--input-padding);
}

textarea, input, select {
    font-family: var(--font-family), sans-serif;
    font-size: 1rem;
    line-height: 1.5;
}

input:focus, textarea:focus, select:focus {
    border-color: var(--color-primary);
    outline: none;
}

.help-text {
    font-size: 0.8rem;
    color: var(--color-text);
    font-weight: lighter;
}

#editor_actions {
    display: flex;
    flex-direction: row-reverse;
    justify-content: space-between;
}

.image-with-preview {
    display: flex;
    flex-direction: row;
    align-items: start;
}

.image-with-preview img.avatar {
    width: 40px;
    height: 40px;
    margin-right: var(--spacing-3);
}

.image-with-preview input {
    flex-grow: 1;
}

#editor {
    margin: 0;
    min-height: 300px;
    font-size: 120%;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

fieldset {
    border: none;
}

.actions {
    margin-bottom: var(--spacing-4);
}

form ul.list-unstyled li > div > label {
    display: none;
}

form > div.form-check {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: var(--spacing-2);
}

form .form-check-input[type="checkbox"] {
    margin-right: var(--spacing-2);
    width: auto;
}

form .form-check-label {
    margin: 0;
    font-weight: normal;
}
