/* Office shell additions to MudBlazor. Login page is statically rendered without MudBlazor components. */

/* MudBlazor copies the Style of a date field to its calendar, so a narrow field cut the calendar off. */
.mud-picker-popover-paper {
    max-width: none !important;
}

/* Right-aligned table cells hold amounts and quantities: "2,68 €" must not break into two lines on narrow screens (tablet). */
.mud-table-root td.mud-table-cell[style*="text-align:right"] {
    white-space: nowrap;
}

.gm-logo {
    height: 32px;
    margin-left: 8px;
}

.gm-login {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eceff1;
    font-family: Roboto, "Segoe UI", Helvetica, Arial, sans-serif;
}

.gm-login-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: min(360px, 90vw);
    padding: 32px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
}

.gm-login-card h1 {
    margin: 0;
    font-size: 1.5rem;
    color: #1565c0;
}

.gm-login-card h2 {
    margin: 0 0 12px;
    font-size: 1.1rem;
    font-weight: 400;
}

.gm-login-card input:not([type=checkbox]) {
    padding: 10px;
    font-size: 1rem;
    border: 1px solid #b0bec5;
    border-radius: 4px;
    margin-bottom: 8px;
}

.gm-login-check {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
}

.gm-login-card button {
    padding: 10px;
    font-size: 1rem;
    color: #fff;
    background: #1565c0;
    border: 0;
    border-radius: 4px;
    cursor: pointer;
}

.gm-login-error {
    margin: 0 0 8px;
    padding: 8px;
    color: #b71c1c;
    background: #ffebee;
    border-radius: 4px;
}

.gm-login-text {
    margin: 0 0 8px;
    color: #455a64;
}

.gm-login-switch {
    margin-top: 8px;
    text-align: center;
    font-size: 0.9rem;
}

/* Operator area (ADR-042): the login card, wider, with a table of the tenants. */
.gm-operator {
    align-items: flex-start;
    padding: 32px 0;
}

.gm-operator-card {
    width: min(900px, 94vw);
}

.gm-operator-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gm-operator-card button.gm-operator-link {
    padding: 4px 8px;
    color: #1565c0;
    background: transparent;
    border: 1px solid #1565c0;
}

.gm-operator-card h2 {
    margin-top: 20px;
}

.gm-operator-form {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-width: 420px;
}

.gm-operator-form small {
    margin: -6px 0 8px;
    color: #607d8b;
}

.gm-operator-table {
    border-collapse: collapse;
    width: 100%;
}

.gm-operator-table th,
.gm-operator-table td {
    padding: 6px 8px;
    border-bottom: 1px solid #cfd8dc;
    text-align: left;
}

.gm-operator-ok {
    margin: 8px 0;
    padding: 8px;
    color: #1b5e20;
    background: #e8f5e9;
    border-radius: 4px;
}

/* Help side panel (HelpDrawer): rendered Markdown, styled like the MudBlazor body text. */
.gm-help {
    font-size: .9rem;
    line-height: 1.5;
}

.gm-help h2 {
    margin: 1.25rem 0 .5rem;
    font-size: 1.05rem;
    font-weight: 500;
    scroll-margin-top: 72px;
}

.gm-help p,
.gm-help ul,
.gm-help ol {
    margin: 0 0 .75rem;
}

.gm-help ul,
.gm-help ol {
    padding-left: 1.25rem;
}

.gm-help li {
    margin-bottom: .25rem;
}

.gm-help table {
    border-collapse: collapse;
    margin-bottom: .75rem;
    width: 100%;
}

.gm-help th,
.gm-help td {
    padding: 4px 8px;
    border-bottom: 1px solid #e0e0e0;
    text-align: left;
}

.gm-help img {
    max-width: 100%;
    height: auto;
    margin: .25rem 0 .75rem;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
}

/* GmHint: a field keeps its full width inside the tooltip wrapper; long hints wrap instead of running across the page. */
.gm-hint-block {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    max-width: 100%;
    min-width: 0;
}

/* Like MudBlazor's .mud-input-control-boolean-input: switches and check boxes do not stretch. */
.gm-hint-block:has(> .mud-input-control-boolean-input) {
    flex: none;
}

.mud-popover.mud-tooltip {
    max-width: 340px !important;
    white-space: normal !important;
    text-align: left;
    font-weight: 400;
}
