File src/www/admin/static/styles/03-forms.css artifact 6de6ba415b part of check-in 1f19f2b41f


/* Forms */
fieldset {
    border: 1px solid var(--gLightBorderColor);
    padding: 0.8em 1em 0 1em;
    margin-bottom: 1em;
    padding: 0.5em;
}

fieldset legend {
    padding: 0 0.5em;
    font-weight: bold;
    color: rgb(var(--gTextColor));
}

/* Override selector in 06-tables.css */
table tr.clickable:hover, table tr.clickable:nth-child(even):hover {
    cursor: pointer;
    color: #633;
    background: #ffc;
}

table tr.clickable:hover button, table tr.focused button {
    color: rgb(var(--gHoverLinkColor));
}

table tr.focused {
    color: #633;
    background: #ffc !important;
    box-shadow: 0 0 5px .2rem #990;
}

dl dt label {
    font-weight: bold;
}

fieldset dl dt b {
    color: rgb(var(--gHoverLinkColor));
    font-size: 0.7em;
    font-weight: normal;
    vertical-align: super;
}

fieldset dl dt i {
    color: var(--gLightBorderColor);
    font-size: 0.7em;
    font-weight: normal;
    vertical-align: super;
}

fieldset dl dd {
    padding: 0.2em 0.5em 0.2em 1em;
}

fieldset dl dd ol, fieldset dl dd ul {
    margin-left: 1.5em;
}

fieldset dl dl {
    margin: .5em 0 .5em 1.2em;
}

label:hover {
    cursor: pointer;
}

input[type=checkbox] + label:hover {
    border: none;
}

/* We can't use :not([type=checkbox]):not([type=radio]) here as it is too specific
and then it's a mess to override the selector after... */
input[type=text], input[type=number], input[type=color],
input[type=date], input[type=datetime-local], input[type=datetime], input[type=time], input[type=week],
input[type=email], input[type=file], input[type=url], input[type=month],
input[type=password], input[type=range], input[type=search], input[type=tel],
textarea, select, .input-list, .file-selector {
    padding: .4rem .6rem;
    font-family: inherit;
    min-width: 20em;
    max-width: 100%;
    border: 1px solid rgb(var(--gMainColor));
    font-size: inherit;
    background: rgb(var(--gBgColor));
    color: rgb(var(--gTextColor));
    border-radius: .25rem;
    transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
}

textarea.full-width {
    width: calc(100% - 1rem);
}

input:not(:placeholder-shown):focus:invalid {
    border-color: rgb(var(--gHoverLinkColor));
}

input.time {
    text-align: center;
    padding: .2em 0;
}

/* Fake checkbox and radio buttons */
input[type=checkbox], input[type=radio] {
    position: absolute;
    opacity: 0;
}

input[type=checkbox] + label::before, input[type=radio] + label::before {
    display: inline-block;
    width: 1em;
    height: 1em;
    text-align: center;
    transition: color .2s, box-shadow .2s ease-in-out;
    text-shadow: 1px 1px 3px var(--gLightBorderColor);
    cursor: pointer;
    font-family: gicon;
    font-size: 1.2rem;
    font-weight: normal;
    color: rgb(var(--gMainColor));
    margin-right: .5em;
    border-radius: .25rem;
    padding: .1rem .2rem;
}

input[type=checkbox] + label::before {
    content: "☐";
}

input[type=checkbox]:checked + label::before {
    content: "☑";
}

input[type=radio] + label::before {
    content: "◯";
}

input[type=radio]:checked + label::before {
    content: "⬤";
}

input:hover + label::before {
    color: rgb(var(--gSecondColor));
}

input:checked + label::before {
    text-shadow: 1px 1px 5px rgba(var(--gSecondColor), 0.5);
}

#queryBuilder input[type=checkbox] {
    position: unset;
    opacity: unset;
}

/* buttons */

input[type=submit], input[type=button], button, input[type=file] {
    border-radius: 1em;
    border: none;
    box-shadow: 0px 0px 5px 0 var(--gLightBorderColor);
    cursor: pointer;
    border: 2px solid rgba(var(--gMainColor), 0.5);
    background: rgba(var(--gSecondColor), 0.2);
    display: inline-block;
    font-size: inherit;
    border-radius: .2em;
    padding: .2em .4em;
    margin: .2em .5em;
    text-decoration: none;
    transition: color .3s, background-color .3s;
    color: rgb(var(--gTextColor));
}

input:focus, button:focus, select:focus, textarea:focus, input[type=radio]:focus + label::before, input[type=checkbox]:focus + label::before {
    box-shadow: 0 0 5px .2rem rgba(var(--gMainColor), 0.5);
    outline: 0;
}

a.icn-btn, b.btn {
    cursor: pointer;
    color: rgb(var(--gTextColor));
    border: 1px solid rgba(var(--gMainColor), 0.5);
    background: rgba(var(--gSecondColor), 0.1);
    user-select: none;
    display: inline-block;
    font-size: inherit;
    border-radius: .2em;
    padding: .2em .4em;
    margin: .2em .5em;
    white-space: pre;
    transition: color .3s, background-color .3s;
    text-decoration: underline;
}

b.btn {
    cursor: unset;
    text-decoration: none;
    border-bottom: 1px dashed rgba(var(--gMainColor), 0.5);
}

[data-icon]:before, .main[data-icon]:after {
    display: inline-block;
    font-family: "gicon", sans-serif;
    text-shadow: 1px 1px 1px var(--gLightBorderColor);
    padding-right: .5em;
    font-size: 1.2em;
    line-height: .8em;
    vertical-align: middle;
    content: attr(data-icon);
}

[data-icon]:empty:before {
    padding: 0;
}

.icn, .icnl {
    font-family: "gicon", sans-serif;
    font-style: normal;
    font-weight: normal;
    speak: none;
    font-variant: normal;
    text-transform: none;
    position: relative;
}

.actions .icn, .icn.action {
    text-decoration: none;
    border-radius: 1em;
    display: inline-block;
    text-align: center;
    font-size: 1.2em;
    line-height: .8em;
    vertical-align: middle;
    padding: .2em;
    font-family: "gicon", sans-serif;
    color: rgb(var(--gMainColor));
    text-shadow: 1px 1px 1px var(--gBorderColor);
    border: none;
    cursor: pointer;
    position: relative;
    z-index: 200;
}


button.main, .icn-btn.main {
    color: rgb(var(--gTextColor));
    font-size: 1.2em;
    border-radius: 1em;
    padding: .5em 1em;
}

button.main[data-icon]:before, .icn-btn.main:before {
    display: none;
}

button.main[data-icon]:after, .icn-btn[data-icon]:after {
    padding: 0;
    padding-left: .5em;
    padding-right: 0;
    color: rgba(var(--gSecondColor));
    font-size: 1.5rem;
    line-height: .2em;
}

.submit .minor {
    font-size: .9em;
}

input[type=submit]:hover, input[type=button]:hover, button:hover, a.icn-btn:hover, input[type=file]:hover,
.radio-btn:hover div, a.num:hover, .num a:hover {
    background-color: rgba(var(--gSecondColor), 0.2);
    color: rgb(var(--gHoverLinkColor)) !important;
    border-color: rgb(var(--gSecondColor));
}

input[type=submit]:active, input[type=button]:active, button:active, input[type=file]:active {
    box-shadow: 0 0 10px .1rem rgb(var(--gSecondColor));
}

input[type=color] {
    cursor: pointer;
}

input.resetButton {
    margin-left: 1em;
}

input[readonly], input.disabled, input[disabled], textarea[disabled], select[disabled] {
    cursor: not-allowed;
    color: var(--gBorderColor);
    background-color: var(--gLightBackgroundColor);
    border-color: var(--gLightBorderColor);
}

input[disabled]:hover, input[readonly]:hover {
    background-color: unset;
    color: unset;
    border-color: unset;
}

input[disabled] + label {
    color: var(--gBorderColor);
}

input[disabled] + label::before {
    color: var(--gBorderColor);
    cursor: not-allowed;
}

select, input[size], input[type=color], button, input[type=button], input[type=submit], input[type=number] {
    min-width: 0;
}

/* Radio button lists (eg. new transaction) */
form .radio-btn {
    display: table;
    width: 100%;
    padding: 0;
    border-spacing: .5rem .2rem;
}

form .radio-btn label {
    display: table-row;
}

form .radio-btn input + label::before {
    display: table-cell;
}

form .radio-btn input:focus + label::before {
    box-shadow: none;
}

form .radio-btn input:focus + label div {
    box-shadow: 0 0 5px .2rem rgb(var(--gSecondColor));
}

form .radio-btn div {
    display: table-cell;
    border: 1px solid rgba(var(--gSecondColor), 0.5);
    background-color: rgba(var(--gSecondColor), 0.1);
    font-size: inherit;
    border-radius: .2em;
    padding: .2em .4em;
    transition: color .3s, background-color .3s;
    color: rgb(var(--gTextColor));
}

form .radio-btn h3 {
    text-decoration: underline;
}

form .radio-btn input {
    margin: 1em;
}

form .radio-btn .help {
    margin: 0;
    font-size: .9em;
}

form .radio-btn input:checked + label div {
    background-color: rgba(var(--gSecondColor), 0.3);
}

/* Custom list input */
form .input-list {
    padding: 0;
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: start;
    min-width: 0;
}

form .input-list .label {
    padding: .4rem .6rem;
}

form .input-list button {
    padding: .4rem .6rem;
    align-self: stretch;
    flex-shrink: 0;
    margin: 0;
    border: none;
}

form .input-list .label button {
    padding: .2rem;
    border: none;
    background: none;
}

input.money {
    text-align: right;
}

input.money + b {
    padding: .2rem .6rem;
    line-height: 1.5rem;
    color: var(--gBorderColor);
}

p.submit {
    margin: 1em;
}


form .checkUncheck {
    float: left;
}

form span.password_check {
    margin-left: 1em;
    padding: .1em .3em;
    border-radius: .5em;
    color: #000;
}

form span.password_check.fail { background-color: #f99; }
form span.password_check.weak { background-color: #ff9; }
form span.password_check.medium { background-color: #ccf; }
form span.password_check.ok { background-color: #cfc; }

dd.help input[type=text] {
    cursor: pointer;
    font-family: monospace;
}

dd.help.example {
    margin-left: 2.5em;
    font-size: .9em;
}

form p.actions {
    float: right;
}

/** Datepicker widget */
.datepicker-parent {
    position: relative;
}

dialog {
    display: none;
    background: rgb(var(--gBgColor));
    color: rgb(var(--gTextColor));
}

dialog[open] {
    display: block;
}

dialog.datepicker {
    user-select: none;
    position: absolute;
    left: 0;
    margin: 0;
    padding: .3rem;
    border: none;
    box-shadow: 0 0 5px #000;
    border-radius: .5rem;
    z-index: 1000;
}

.datepicker nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: center;
}


.datepicker nav input[type=button] {
    font-family: gicon;
    height: 2em;
    width: 2em;
}

.datepicker span {
    white-space: nowrap;
}

.datepicker span * {
    font-size: 1rem;
    font-family: inherit;
    margin: .1rem;
    padding: .1rem;
    border: 1px solid var(--gLightBorderColor);
    text-align: center;
}

.datepicker table {
    border-collapse: collapse;
    width: 100%;
}

.datepicker thead td {
    font-size: 80%;
    color: var(--gBorderColor);
    text-align: center;
}

.datepicker tbody tr:nth-child(even) {
    background-color: var(--gLightBackgroundColor);
}

.datepicker tbody td:nth-child(6) input {
    color: var(--gBorderColor);
}
.datepicker tbody td:nth-child(7) input {
    color: var(--gBorderColor);
}

.datepicker tbody td {
    text-align: center;
    width: 14.3%;
    padding: 0;
}

.datepicker tbody td input {
    padding: .4rem .7rem;
    border: none;
    background: none;
    box-shadow: none;
    border-radius: .2rem;
    margin: 0;
}

.datepicker tbody td.focus input {
    background: #339;
    color: #fff;
}

.datepicker tbody input:hover {
    background: #ccf;
    color: darkred;
}

fieldset.mailing {
    max-width: 40em;
}

fieldset.mailing dd.preview > * {
    border-radius: .5em;
    background: var(--gLightBackgroundColor);
    padding: 1em;
}

#queryBuilderForm textarea, fieldset.mailing textarea, fieldset.mailing #f_subject, fieldset.mailing #f_target {
    width: calc(100% - 2em);
}


#queryBuilder .column select, #queryBuilderForm .actions select {
    max-width: 15em;
}

#queryBuilder table td {
    vertical-align: top;
    padding: .1em .2em;
}

#queryBuilder table td.buttons {
    white-space: nowrap;
}

#queryBuilder input[type=button], #queryBuilder .values input {
    margin: .1em;
}

#queryBuilderForm .actions label {
    margin: 0 .5em;
}

#queryBuilder table .values label {
    margin: 0 .3em;
}

#queryBuilderForm input[type=number] {
    width: 4em;
}

.tree-selector a {
    color: #666;
}

.tree-selector td {
    width: 15%;
    text-align: right;
}

.tree-selector th {
    width: 85%;
}

.tree-selector i {
    display: inline-block;
    padding: 0 .5em;
}

.tree-selector b {
    display: inline-block;
    padding: 0 .5em;
    color: #999;
}

.tree-selector em {
    font-weight: normal;
}

.tree-selector h3 {
    display: inline-block;
}

.tree-selector .current > a {
    font-weight: bold;
    color: #000;
}

.file-selector {
    position: relative;
    transition: opacity 0.5s;
}

.file-selector::before {
    content: "⇑";
    opacity: 0.2;
    font-size: 2em;
    padding: .2rem;
    position: absolute;
    right: 0;
    font-family: gicon;
}

.file-selector label .help {
    font-style: italic;
}

.file-selector .preview {
    text-align: center;
}

.file-selector img {
    max-width: 10em;
    max-height: 5em;
}

.file-selector table.list .num {
    text-align: right;
}

/**
 * Progress spinner
 */
.progressing {
    position: relative;
}

fieldset.progressing > dl, fieldset.progressing > p {
    opacity: 0.5;
    filter: blur(3px);
}

.progressing::after {
    display: inline-block;
    content: " ";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    margin: auto;
    width: 50px;
    height: 50px;
    border: 5px solid #666;
    border-radius: 50%;
    border-top-color: #ccc;
    animation: spin 1s ease-in-out infinite;
    filter: none;
}

.progress-status {
    display: none;
}

.progressing .progress-status {
    display: inline-block;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    margin: auto;
    padding-top: 80px;
    text-align: center;
    width: 100%;
    height: 1em;
    filter: none !important;
    color: #000;
}

@keyframes spin { to { transform: rotate(360deg); } }

@media screen and (max-width: 1279px) {
    #queryBuilder table tr {
        display: flex;
        flex-wrap: wrap;
        padding: .5em 0;
        margin-left: 6rem;
        border-top: .2rem solid #ccc;
        clear: both;
    }
    #queryBuilder table td {
        display: block;
    }
    #queryBuilder table td.buttons {
        margin-left: -6rem;
    }
}