.form h3,
.form-section,
.form fieldset legend {
    text-transform: uppercase;
    color: var(--theme-fg-text);
    font-size: 0.75rem;
    line-height: 1.1;
    padding: 1rem 0 0.5rem 0 !important;
    font-weight: bold;
    text-shadow: 1px 1px 3px var(--theme-fg-divider);
    margin: 0;
}

.form h4,
.form fieldset fieldset .form-section,
.form fieldset fieldset legend {
    color: var(--theme-fg-hint-text);
}

.form-error {
    color: #660000;
    margin: 5px;
}

.form-label {
    display: block;
    width: 200px;
    text-overflow: ellipsis;
    align-self: center;
}

.form-select {
    width: 100%;
}

.form input:not([type="hidden"], [type="checkbox"], [type="radio"]),
.form textarea,
.form select {
    box-sizing: border-box;
    padding: 2px 6px;
    margin: 4px 0;
    border: 1px solid var(--theme-fg-divider);
    border-radius: 4px;
    background-color: var(--theme-bg-input);
}

.form input:not([type="hidden"], [type="checkbox"], [type="radio"]):focus-visible,
.form textarea:focus-visible,
.form select:focus-visible {
    border-color: var(--theme-primary);
}

.form select {
    padding: 5px 6px;
}

.form input:not([type="hidden"], [type="checkbox"], [type="radio"]) {
    width: 300px;
}

.form-control-wrappper {
    display: flex;
    align-items: center;
    box-sizing: border-box;
    padding: 2px 6px;
    border: 1px solid var(--theme-fg-divider);
    border-radius: 4px;
    background-color: var(--theme-bg-input);
    height: 2rem;
    color: var(--theme-fg-text);
}

.form-control-wrappper input:not([type="hidden"], [type="checkbox"], [type="radio"]),
.form-control-wrappper select,
.form-control-wrappper textarea {
    border: none;
    margin: 0;
    padding: 0;
    background-color: transparent;
}

.form-control-wrappper button {
    border: none !important;
    background: transparent !important;
}

.form-control-wrappper button:last-child {
    margin-right: -6px;
}

.form .validation-error {
    align-self: start;
    position: relative;
    background-color: var(--theme-error-light);
    color: var(--theme-error-dark);
    padding: 0 0.5rem;
    border-radius: 4px;
    border: 1px solid var(--theme-error-dark);
    margin-top: 3px;
}

.form .validation-error::after {
    content: "";
    display: block;
    rotate: 45deg;
    border-left: 1px solid var(--theme-error-dark);
    border-top: 1px solid var(--theme-error-dark);
    background-color: var(--theme-error-light);
    width: 3px;
    height: 3px;
    position: absolute;
    top: -3px;
    z-index: 1;
}