﻿.validation-message {
    color: red;
    align-items: flex-end;
    gap: .35rem;
    font-size: .75rem;
}

    .validation-message::before {
        content: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
    }


.form-floating.compact > .form-control {
    height: auto !important;
    min-height: 2.5rem !important;
    padding-top: 1rem !important;
    padding-bottom: 0.25rem !important;
}

.form-floating.compact > .form-select {
    height: auto !important;
    min-height: 2.5rem !important;
    padding-top: 1rem !important;
    padding-bottom: 0.25rem !important;
}

.form-floating.compact > label {
    padding-top: .5rem;
}

.modified.valid {
    border-color: green;
    padding-inline-end: calc(1.5em + 0.75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='M2.3 6.73.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.invalid {
    border-color: red !important;
    padding-inline-end: calc(1.5em + 0.75rem);
    /* outline moved here from css/site.css, which has been deleted */
    outline: 1px solid red;
}

/* Blazor's EditForm adds .modified .valid to a touched, valid field.
   Moved here from css/site.css. Literal green kept so the tick colour
   does not shift; --stk-success is a different hue. */
.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.form-floating.compact input.invalid ~ label {
    color: red !important;
}

.form-floating.compact select.invalid ~ label {
    color: red !important;
}

.d-flex.flex-column.me-2 > button {
    all: unset;
    width: 1rem;
    height: 0.7rem;
    min-width: 0; /* remove browser default */
    min-height: 0; /* remove browser default */
    padding: 0;
    margin: 0;
    margin-left: 5px;
    border: 1px solid #e9ecef;
    border-radius: 0;
    background-color: #e9ecef;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.75rem;
    color: #495057;
}

/*Hover effect like native buttons*/
.d-flex.flex-column.me-2 > button:hover {
    background-color: #ced4da;
}

/*Optional: remove focus outline*/
.d-flex.flex-column.me-2 > button:focus {
    outline: none;
    box-shadow: none;
}

.form-check.form-switch .form-check-input[type="checkbox"] {
    height: 1.0rem;
}
