/* Shared appearance for record editors, based on the member form. */
.ag-form-editor {
    --ag-edit-surface: #fff;
    --ag-edit-heading: #f5f9fb;
    --ag-edit-footer: #f6fafc;
    --ag-edit-border: #cadce7;
    --ag-edit-divider: #dce7ed;
    --ag-edit-text: #173d52;
    --ag-edit-label: #43667b;
    --ag-edit-focus: var(--rz-primary, #008e9c);
    --ag-edit-radius: 6px;
    color: var(--ag-edit-text);
    min-width: 0;
}

.ag-form-editor :is(.ag-editor-section, .almacen-editor-grupo, .entrada-panel, .salida-panel) {
    border-color: var(--ag-edit-divider);
    border-radius: 9px;
    background: var(--ag-edit-surface);
}

.ag-form-editor :is(.ag-editor-section, .entrada-panel, .salida-panel) > header {
    background: var(--ag-edit-heading);
    border-color: var(--ag-edit-divider);
    color: var(--ag-edit-text);
}

.ag-form-editor :is(label, legend):not(:where(.rz-data-grid *, .rz-dropdown-panel *)) {
    color: var(--ag-edit-label);
}

.ag-form-editor label:has(> :is(input:not([type=checkbox], [type=radio], [type=hidden]), select, textarea)):not(:where(.rz-data-grid *)) {
    font-weight: 600;
}

.ag-form-editor :is(input:not([type=checkbox], [type=radio], [type=hidden], [type=range], [type=color], [type=button], [type=submit], .rz-inputtext), select, textarea,
                   .rz-textbox, .rz-numeric, .rz-dropdown, .rz-datepicker > input):not(:where(.rz-data-grid *, .rz-numeric *, .rz-dropdown-panel *)) {
    min-height: 41px;
    max-width: 100%;
    box-sizing: border-box;
    border: 1px solid var(--ag-edit-border);
    border-radius: var(--ag-edit-radius);
    background: var(--ag-edit-surface);
    color: var(--ag-edit-text);
    font-size: 14px;
}

.ag-form-editor :is(label, .ag-editor-field) > :is(input:not([type=checkbox], [type=radio], [type=hidden]), select, textarea):not(:where(.rz-data-grid *)) {
    width: 100%;
    padding: .55rem .7rem;
    font-weight: 400;
}

.ag-form-editor :is(input, textarea, select, .rz-textbox):not(:where(.rz-data-grid *)):focus,
.ag-form-editor :is(.rz-numeric, .rz-dropdown):not(:where(.rz-data-grid *)):focus-within {
    border-color: var(--ag-edit-focus);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--ag-edit-focus) 14%, transparent);
}

.ag-form-editor :is(input, textarea)[readonly]:not(:where(.rz-data-grid *)) {
    border-style: dashed;
    background: #f1f5f8;
    color: #587387;
}

.ag-form-editor :is(.rz-button, button[type=submit]):not(:where(.rz-data-grid *, .rz-dropdown-panel *)) {
    border-radius: var(--ag-edit-radius);
}

.ag-form-editor > footer,
.ag-form-editor :is(.ag-editor-footer, .ag-doc-actions, .ag-tarifa-actions, .ag-reading-actions,
                   .ag-cobro-editor-actions, .almacen-editor-acciones, .entrada-acciones, .salida-acciones):not(:where(.rz-data-grid *)) {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 14px 16px;
    border-top: 1px solid var(--ag-edit-divider);
    background: var(--ag-edit-footer);
}

.ag-form-editor.ag-member-editor .ag-editor-footer {
    padding: 17px 30px;
}

@media (max-width: 600px) {
    .ag-form-editor.ag-member-editor .ag-editor-footer { padding: 15px 16px; }
}
