﻿/* MASTER FORM � requires master-theme.css. See MASTER-PAGE-STYLES.md.
   Wrap any master EditForm in .master-page.master-form; use .master-field
   around text inputs, finders and multiselect finders. Set Variant.Outlined
   on the component itself; CSS cannot change a Blazor component's variant. */
.master-form {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
}

.master-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 26px 24px;
    align-items: start;
}

.master-form-grid-three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.master-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.master-field-full {
    grid-column: 1 / -1;
}

.master-field-label {
    font-size: .85rem;
    font-weight: 600;
    color: #36536f;
}

.master-required {
    color: #b72e43;
    margin-left: 3px;
}

.master-field-help {
    font-size: .76rem;
    color: var(--master-muted);
}

.master-field .mud-input-control {
    margin-top: 0;
    width: 100%;
    min-width: 0;
    font-family: inherit;
}

.master-field .mud-input-outlined {
    background: #ffffffc9;
    border-radius: 10px;
    color: var(--master-ink);
    font-size: .92rem;
    font-family: inherit;
}

.master-field .mud-input-outlined-border {
    border-color: #cad9e9;
}

.master-field .mud-input-outlined:hover .mud-input-outlined-border {
    border-color: #86a6d0;
}

.master-field .mud-input-outlined:focus-within .mud-input-outlined-border {
    border-color: var(--master-blue);
}

.master-field .mud-input-label {
    font-family: inherit;
    font-size: .9rem;
}

.master-field .mud-input-helper-text {
    font-size: .75rem;
}

.master-field .mud-input-adornment .mud-icon-button {
    border-radius: 8px;
    color: #3573c5;
}

    .master-field .mud-input-adornment .mud-icon-button:hover {
        background: #e9f2ff;
    }

.master-field input[readonly], .master-field input:disabled {
    color: #647b91;
}

.master-field .mud-disabled.mud-input-outlined {
    background: #f0f4f8;
}
/* Finder modifiers identify the purpose; base field styling handles Mud/XS inputs.
   Portalled popup content is intentionally NOT targeted globally. */
.master-field-finder .mud-input-adornment {
    color: #3573c5;
}

.master-field-multiselect .mud-chip {
    border-radius: 7px;
    background: #edf4ff;
    color: #2e5e9e;
    border: 1px solid #dbe8fb;
    max-width: 100%;
    height: auto;
    min-height: 26px;
}

.master-field-multiselect .mud-chip-content {
    white-space: normal;
    overflow-wrap: anywhere;
}
/* Checkboxes/switches and radio groups: wrap the existing bound components. */
.master-choice-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    padding: 10px 14px;
    border: 1px solid #dce7f0;
    border-radius: 10px;
    background: #f7fbffba;
}

    .master-choice-group .mud-input-control {
        width: auto;
    }

    .master-choice-group .mud-typography {
        font-family: inherit;
        font-size: .88rem;
    }

    .master-choice-group .mud-checkbox .mud-button-root, .master-choice-group .mud-radio .mud-button-root {
        color: var(--master-green);
    }

    .master-choice-group .mud-disabled {
        opacity: .6;
    }

.master-radio-group .mud-radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
}
/* Footer: navigation on left, save/update/delete actions on right. */
.master-form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    padding-top: 24px;
    margin-top: 34px;
    border-top: 1px solid #e2ebf4;
}

@media (max-width: 1000px) {
    .master-form-grid-three {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .master-form-grid, .master-form-grid-three {
        grid-template-columns: minmax(0, 1fr);
        gap: 22px;
    }

    .master-form-actions {
        flex-direction: column-reverse;
        align-items: stretch;
    }

        .master-form-actions .master-action-group {
            width: 100%;
        }

        .master-form-actions .master-button {
            flex: 1;
        }

    .master-choice-group {
        gap: 8px;
    }
}
