/*
 * Admin: Användare (Admin.razor). Owner: package B5. Registered on the theme after documents.css.
 * Own classes (CssClass on the DevExpress components or on our own elements) with public --dxds-* / --eng-* values.
 */

/* ------------------------------------------------------------------ */
/* Toolbar of the grid: the labelled search box first, the Exportera menu at the end of the row */
/* ------------------------------------------------------------------ */
.eng-admin-toolbar {
    display: flex;
    width: 100%;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--dxds-spacing-160);
    padding: var(--dxds-spacing-160);
}

.eng-admin-search {
    display: grid;
    flex: 1 1 18rem;
    max-width: 26rem;
    gap: var(--dxds-spacing-60);
}

.eng-admin-search label {
    font-weight: var(--dxds-font-weight-700);
}

/* ------------------------------------------------------------------ */
/* Status: an icon and the word. The colour only supports the words, it never carries the meaning alone. */
/* ------------------------------------------------------------------ */
.eng-admin-status {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--dxds-spacing-80);
}

.eng-admin-status-ok {
    color: var(--dxds-color-content-success-default-rest);
}

/* Not Fluent's orange: orange is the brand's one decoration (red thread 2). The hourglass and the words say "waiting". */
.eng-admin-status-pending {
    color: var(--dxds-color-content-neutral-subdued-rest);
}

/* ------------------------------------------------------------------ */
/* Row actions and the Exportera button: at least 44 px high (red thread 10) */
/* ------------------------------------------------------------------ */
.eng-admin-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--dxds-spacing-80);
}

.eng-admin-action,
.eng-admin-info,
.eng-admin-export {
    min-width: 2.75rem;
    min-height: 2.75rem;
}

/* ------------------------------------------------------------------ */
/* No users, or no match for the search */
/* ------------------------------------------------------------------ */
.eng-admin-empty {
    display: grid;
    justify-items: center;
    gap: var(--dxds-spacing-120);
    padding: var(--dxds-spacing-320) var(--dxds-spacing-160);
}

.eng-admin-empty p {
    margin: 0;
}

/* ------------------------------------------------------------------ */
/* A field error in an edit cell: text at the field, in the danger colour (the words carry the meaning) */
/* ------------------------------------------------------------------ */
.eng-admin-field-error {
    margin-top: var(--dxds-spacing-60);
    color: var(--dxds-color-content-danger-default-rest);
}

/* ------------------------------------------------------------------ */
/* The link to the mail texts under the heading (#118). Not at the right of the title row: a toast (top right) would
   cover it while it has the focus (WCAG 2.4.11). */
/* ------------------------------------------------------------------ */
.eng-admin-title-link {
    display: inline-flex;
    align-items: center;
    gap: var(--dxds-spacing-60);
    min-height: 2.75rem;
}

/* ------------------------------------------------------------------ */
/* E-postmallar (#118): the form (DxFormLayout), then the preview of the mail. */
/* ------------------------------------------------------------------ */
/* One column, the preview under the form: the reading order and the Tab order are the same (the keyboard test). */
.eng-mailtpl {
    display: grid;
    max-width: 52rem;
    gap: var(--dxds-spacing-240);
}

/* The frame is a Tab stop (its content scrolls); the ring goes on the box, as on the recipe frame (#108). Chrome does
   not match :focus-within while the frame's document has the focus; recipe-view.js sets the class then. */
.eng-mailtpl-frame-box:focus-within,
.eng-mailtpl-frame-box.eng-recipe-frame-box-focus {
    outline: var(--eng-focus-ring-width) solid var(--eng-focus-ring-color);
    outline-offset: var(--eng-focus-ring-offset);
}

/* The mail is 600 px wide with its own grey surround; the frame shows all of it on a wide screen and scrolls inside. */
.eng-mailtpl-frame {
    display: block;
    width: 100%;
    height: 46rem;
    border: 1px solid var(--dxds-color-border-neutral-default-rest);
}

/* ------------------------------------------------------------------ */
/* Logg (#111): the buttons, the filters above each grid, and the level as a word in colour (the word carries the
   meaning; the colour only helps, WCAG 1.4.1). */
/* ------------------------------------------------------------------ */
.eng-log-actions,
.eng-log-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--dxds-spacing-120);
    margin-bottom: var(--dxds-spacing-160);
}

.eng-log-tabs {
    margin-top: var(--dxds-spacing-120);
}

.eng-log-filters {
    margin-top: var(--dxds-spacing-160);
}

.eng-log-filter {
    width: 16rem;
    max-width: 100%;
}

.eng-log-download {
    display: inline-flex;
    align-items: center;
    gap: var(--dxds-spacing-60);
    min-height: 2.75rem;
}

.eng-log-level {
    font-weight: 700;
}

.eng-log-level-error,
.eng-log-level-critical {
    color: var(--dxds-color-content-danger-default-rest);
}

.eng-log-exception {
    display: block;
    margin-top: var(--dxds-spacing-40);
    color: var(--dxds-color-content-danger-default-rest);
    overflow-wrap: anywhere;
}

/* A long word (a path, an address, a key id) breaks instead of being cut off or sticking out (WCAG 1.4.10, 200 % and
   400 % zoom). On our own span in the cell template: the grid's own rule for its cells sets overflow-wrap: normal. With
   the columns' MinWidth the grid scrolls inside its own box at 320 px, as the user grid does. */
.eng-log-wrap {
    overflow-wrap: anywhere;
}

.eng-log-empty {
    margin: 0;
}
