/* 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: 10px 0; padding-left: 10px; border-left: 8px solid transparent; } .form-group--required { border-left: 8px solid var(--lighterbase); } .form-group--valid { border-left: 8px solid var(--validbase); } .form-group--has-error { border-left: 8px solid var(--errorbase) !important; } .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"] { background-color: rgba(0, 0, 0, 0.05); padding: 7px 3px 7px; outline: 0; border: 0; border-bottom: 2px solid var(--darkbase); box-shadow: 0 2px 13px rgba(0, 0, 0, 0.05); color: var(--fontbase); transition: all .1s; font-size: 16px; min-width: 400px; } input[type="text"]:focus, input[type="password"]:focus, input[type="url"]:focus, input[type="number"]:focus, input[type="email"]:focus { border-bottom-color: var(--lightbase); background-color: transparent; } /* BUTTON STYLE SEE default-layout.lucius */ /* TEXTAREAS */ textarea { outline: 0; border: 0; padding: 7px 4px; min-width: 400px; min-height: 100px; font-family: var(--fontfamilybase); font-size: 16px; color: var(--fontbase); background-color: rgba(0, 0, 0, 0.05); box-shadow: 0 2px 13px rgba(0, 0, 0, 0.05); border-bottom: 2px solid var(--darkbase); } textarea:focus { background-color: transparent; border-bottom-color: var(--lightbase); } /* CUSTOM LEGACY CHECKBOX AND RADIO BOXES */ input[type="checkbox"] { position: relative; height: 20px; width: 20px; -webkit-appearance: none; cursor: pointer; } input[type="checkbox"]::before { content: ''; position: absolute; width: 20px; height: 20px; background-color: var(--lighterbase); display: flex; align-items: center; justify-content: center; border-radius: 2px; } input[type="checkbox"]:checked::before { background-color: var(--lightbase); } 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(--greybase); 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(--lightbase); text-decoration: underline; } &:hover > label { background-color: var(--lighterbase); } &: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(--fontsec); transform: translate(0, 0); transition: all .1s; } .reactive-label--small { cursor: default; color: var(--fontbase); } @media (max-width: 999px) { .reactive-label { position: relative; transform: translate(2px, 30px); } .reactive-label--small { transform: translate(2px, 0px); color: var(--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(--whitebase); cursor: pointer; } .file-input__label, .file-checkbox__label { text-align: left; position: relative; height: 30px; } .file-checkbox__label { background-color: var(--greybase); 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(--warningbase); 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(--lightbase); } .file-checkbox__container--checked > .file-checkbox__label { text-decoration: none; background-color: var(--lighterbase); &.btn:hover { background-color: var(--lighterbase); 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; } }