/* LSG forms: inputs, form messages and multi-step forms. Linked before main.css in Views/_Layout.cshtml. */

/* Focus on any input, select or check: Bootstrap's border and glow, in the accent instead of its fixed blue */
.form-control:focus,
.form-select:focus,
.form-check-input:focus {
    border-color: var(--lsg-color-primary);
    box-shadow: 0 0 0 0.25rem rgba(var(--lsg-color-primary-rgb), 0.25);
}

/* Icon input: one box with an icon on the left, the input, and an optional button (e.g. show password) on the right.
   Borders and text come from Bootstrap's variables (theme); the icon and the button sit on the field's white */
.lsg-input-icon .input-group-text {
    background-color: var(--lsg-color-surface);
}

.lsg-input-icon .btn {
    --bs-btn-color: var(--lsg-color-text);
    --bs-btn-bg: var(--lsg-color-surface);
    --bs-btn-border-color: var(--lsg-color-border);
}

.lsg-input-icon .input-group-text {
    border-right: 0;
}

.lsg-input-icon .form-control {
    border-left: 0;
}

.lsg-input-icon .form-control:not(:last-child) {
    border-right: 0;
}

.lsg-input-icon .btn {
    border-left: 0;
}

/* Focus shows as the accent on the whole box (below), instead of Bootstrap's glow around the input alone */
.lsg-input-icon .form-control:focus {
    box-shadow: none;
}

.lsg-input-icon:focus-within .input-group-text,
.lsg-input-icon:focus-within .form-control,
.lsg-input-icon:focus-within .btn {
    border-color: var(--lsg-color-primary);
}

/* Form messages: a form's error summary is plain red text; hidden while there is nothing to show */
.validation-summary-valid {
    display: none;
}

/* Steps: numbered steps joined by a line; the current one (.active) and finished ones (.done) in the accent colour */
.lsg-steps {
    display: flex;
    margin: 0;
    padding: 0;
    list-style: none;
}

.lsg-steps li {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 150px;
    font-size: 12px;
    color: var(--lsg-color-text-muted);
}

.lsg-steps li + li::before {
    content: "";
    position: absolute;
    top: 12px;
    right: 50%;
    width: 100%;
    border-top: 1px solid var(--lsg-color-border);
}

.lsg-steps span {
    position: relative;
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    margin-bottom: 4px;
    border: 1px solid var(--lsg-color-border);
    border-radius: 50%;
    background-color: var(--lsg-color-surface);
}

.lsg-steps li.active,
.lsg-steps li.done {
    color: var(--lsg-color-text);
}

.lsg-steps li.active span,
.lsg-steps li.done span {
    border-color: var(--lsg-color-primary);
    color: var(--lsg-color-on-primary);
    background-color: var(--lsg-color-primary);
}
