/* GENERAL STYLES FOR FORMS */ form { margin: 20px 0; } /* FORM GROUPS */ .form-group { position: relative; display: flex; display: grid; grid-template-columns: 25% max-content; grid-auto-columns: 25%; grid-gap: 5px; justify-content: flex-start; align-items: center; margin: 17px 0; padding-left: 10px; border-left: 2px solid transparent; } .form-group__label { width: 25%; white-space: nowrap; font-weight: 600; } @media (max-width: 999px) { .form-group { grid-template-columns: 1fr; grid-template-rows: 30px; align-items: baseline; margin-top: 17px; flex-direction: column; > * { width: 100%; } } } /* TEXT INPUTS */ input[type="text"], input[type="password"], input[type="url"], input[type="number"], input[type="email"] { /* from bulma.css */ background-color: #fff; border-color: #dbdbdb; color: #363636; box-shadow: inset 0 2px 3px 1px rgba(50,50,50,.1); min-width: 400px; -webkit-appearance: none; align-items: center; border: 1px solid transparent; border-radius: 4px; display: inline-flex; font-size: 1rem; height: 2.25em; justify-content: flex-start; line-height: 1.5; padding-bottom: calc(.375em - 1px); padding-left: calc(.625em - 1px); padding-right: calc(.625em - 1px); padding-top: calc(.375em - 1px); position: relative; vertical-align: top; } .form-group--required { .form-group__label::before { content: '*'; position: absolute; left: -14px; } input, textarea { border-bottom-color: var(--color-primary); } } .form-group--valid { input, textarea { border-bottom-color: var(--color-success); } } .form-group--has-error { input, textarea { border-bottom-color: var(--color-error); } } input[type="text"]:focus, input[type="password"]:focus, input[type="url"]:focus, input[type="number"]:focus, input[type="email"]:focus { /* border-bottom-color: var(--color-light); background-color: transparent; box-shadow: 0 0 13px var(--color-lighter); */ border-color: #3273dc; box-shadow: 0 0 0 0.125em rgba(50,115,220,.25); outline: 0; } /* BUTTON STYLE SEE default-layout.lucius */ /* TEXTAREAS */ textarea { -webkit-appearance: none; appearance: none; border: 1px solid transparent; border-radius: 2px; display: inline-flex; font-size: 1rem; height: 170px; width: 400px; line-height: 1.5; padding-bottom: calc(.375em - 1px); padding-left: calc(.625em - 1px); padding-right: calc(.625em - 1px); padding-top: calc(.375em - 1px); position: relative; vertical-align: top; background-color: #fff; border-color: #dbdbdb; color: #363636; box-shadow: inset 0 1px 2px rgba(10,10,10,.1); } textarea:focus { border-color: #3273dc; box-shadow: 0 0 0 0.125em rgba(50,115,220,.25); outline: 0; } /* CUSTOM LEGACY CHECKBOX AND RADIO BOXES */ input[type="checkbox"] { position: relative; height: 20px; width: 20px; -webkit-appearance: none; appearance: none; cursor: pointer; } input[type="checkbox"]::before { content: ''; position: absolute; width: 20px; height: 20px; background-color: var(--color-lighter); display: flex; align-items: center; justify-content: center; border-radius: 2px; } input[type="checkbox"]:checked::before { background-color: var(--color-light); } input[type="checkbox"]:checked::after { content: '✓'; position: absolute; width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; color: white; font-size: 20px; } /* CUSTOM CHECKBOXES AND RADIO BOXES */ /* Completely replaces legacy checkbox and radiobox */ .checkbox, .radio { position: relative; > [type="checkbox"], > [type="radio"] { display: none; } > label { display: block; height: 30px; width: 30px; background-color: var(--color-grey); border-radius: 4px; color: white; cursor: pointer; } > label::before, > label::after { content: ''; position: absolute; top: 14px; left: 5px; display: block; width: 20px; height: 20px; background-color: white; transition: all .2s; } > label::before { width: 20px; height: 2px; transform: scale(0.1, 0.1); } > label::after { width: 20px; height: 2px; transform: scale(0.1, 0.1); } > :checked + label { background-color: var(--color-light); text-decoration: underline; } &:hover > label { background-color: var(--color-lighter); } &:hover > label::before { transform: scale(0.8, 0.4); } > :checked + label::before { transform: scale(1, 1) rotate(45deg); } > :checked + label:hover::after, > :checked + label:hover::before { transform: scale(1, 1) rotate(0deg); } &:hover > label::after { transform: scale(0.8, 0.4); } > :checked + label::after { transform: scale(1, 1) rotate(-45deg); } } .radio > label::before { transform: scale(0.01, 0.01) rotate(45deg); } .radio > label::after { transform: scale(0.01, 0.01) rotate(-45deg); } .radio::before { content: ''; position: absolute; top: 2px; left: 2px; right: 2px; bottom: 2px; border-radius: 4px; border: 2px solid white; z-index: -1; } /* REACTIVE LABELS */ .reactive-label { cursor: text; color: var(--color-fontsec); transform: translate(0, 0); transition: all .1s; } .reactive-label--small { cursor: default; color: var(--color-font); } @media (max-width: 999px) { .reactive-label { position: relative; transform: translate(2px, 30px); } .reactive-label--small { transform: translate(2px, 0px); color: var(--color-fontsec); /*font-size: 14px;*/ } } /* CUSTOM FILE INPUT */ input[type="file"].js-file-input { color: white; width: 0.1px; height: 0.1px; opacity: 0; overflow: hidden; position: absolute; z-index: -1; outline: 0; border: 0; } .file-input__wrapper { grid-column-start: 2; } .file-input__container, .file-checkbox__container, .file-input__unpack { grid-column-start: 2; display: flex; justify-content: space-between; margin: 4px 0; } .file-input__label, .file-input__remover, .file-checkbox__label, .file-checkbox__remover { display: block; border-radius: 2px; padding: 5px 13px; color: var(--color-lightwhite); cursor: pointer; } .file-input__label, .file-checkbox__label { text-align: left; position: relative; height: 30px; } .file-checkbox__label { background-color: var(--color-grey); text-decoration: line-through; } .file-input__label.btn, .file-checkbox__label.btn { padding: 5px 13px; } .file-input__label::after, .file-input__label::before { position: absolute; content: ''; background-color: white; width: 16px; height: 2px; top: 14px; top: 50%; left: 12px; left: 50%; } .file-input__label::after { transform: translate(-50%, -50%) rotate(90deg); } .file-input__label::before { transform: translate(-50%, -50%); } .file-checkbox__checkbox { margin-left: 10px; } .file-input__remover { display: none; width: 40px; height: 30px; text-align: center; background-color: var(--color-warning); position: relative; margin-left: 10px; } .file-input__remover::before { position: absolute; content: ''; width: 16px; height: 2px; top: 14px; left: 12px; background-color: white; } .file-input__container--valid > .file-input__label { background-color: var(--color-light); } .file-checkbox__container--checked > .file-checkbox__label { text-decoration: none; background-color: var(--color-lighter); &.btn:hover { background-color: var(--color-lighter); text-decoration: line-through; } } .file-input__container--valid > .file-input__label::before, .file-input__container--valid > .file-input__label::after { content: none; } .file-input__container--valid > .file-input__remover { display: block; } @media (max-width: 999px) { .file-input__wrapper, .file-input__container, .file-checkbox__container, .file-input__unpack { grid-column-start: 1; } }