/* ===========================================================================
   ZertYX brand layer for Pkmt Glass
   ---------------------------------------------------------------------------
   Loaded after _content/Pkmt.Glass/css/pkmt-glass.css and unlayered, so it
   always wins. Logo files: _content/ZertYX.UI/branding/.
   =========================================================================== */

:root {
    /* Accent (tint): ZertYX blue; the lighter blue of the dark wordmark on dark backgrounds. */
    --pg-accent-light: #033E8C;
    --pg-accent-dark: #4E9BFF;

    /* Height of the wordmark in the sidebar. */
    --pg-brand-h: 1.5rem;
}

/* Logo (ZertYXLogo, inline SVG). Colours follow the appearance: "Zert" #0B0B0D / #FFFFFF,
   "YX" and the mark in the accent (#033E8C / #4E9BFF). */
.zx-logo {
    display: block;
    width: auto;
    overflow: visible;
}

.zx-logo--wordmark {
    aspect-ratio: 2092 / 382;
}

.zx-logo--mark {
    aspect-ratio: 330 / 371;
}

.zx-logo-ink {
    fill: #0B0B0D;
}

:root[data-theme="dark"] .zx-logo-ink {
    fill: #FFFFFF;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .zx-logo-ink {
        fill: #FFFFFF;
    }
}

.zx-logo-accent {
    fill: var(--pg-accent);
}

/* Sidebar header: the mark (collapsed rail) and the Z of the wordmark (expanded) lie exactly on top
   of each other, so the cross-fade does not jump. The mark is centred in the rail, on the axis of the
   navigation icons; the wordmark starts where its Z (330 of 2092 units wide) is centred there too.
   The mark gets the Z's exact size (371 of 382 units high) and its top edge. */
.pg-brand-full:has(> .zx-logo--wordmark) {
    inset-inline-start: calc((var(--pg-rail-w) - 2 * var(--pg-panel-inset) - .75rem - var(--pg-brand-h, 1.5rem) * 330 / 382) / 2);
}

.pg-brand-compact .zx-logo {
    height: calc(var(--pg-brand-h, 1.5rem) * 371 / 382);
    margin-block-end: calc(var(--pg-brand-h, 1.5rem) * 11 / 382);
}

/* Setup wizard (Pages/Setup) */
.zx-onboarding {
    max-width: 40rem;
    margin: 0 auto;
    padding: clamp(1.5rem, 6vh, 4rem) 1rem 3rem;
}

.zx-onboarding-brand {
    margin-bottom: 1.5rem;
}

.zx-onboarding-brand > * {
    height: 2.25rem;
    width: auto;
}

.zx-choice {
    display: grid;
    gap: .75rem;
}

/* Start screen of the app (continues the native splash: white Z on brand blue) */
.zx-splash {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.75rem;
    padding: 1.5rem;
    background: #033E8C;
    color: #FFFFFF;
    text-align: center;
}

.zx-splash-mark {
    width: 96px;
    height: auto;
}

.zx-splash-mark path,
.zx-splash .zx-logo-accent {
    fill: #FFFFFF;
}

.zx-splash-status {
    min-height: 3em;
    max-width: 28rem;
    font-size: var(--pg-fs-subheadline, .9375rem);
    line-height: 1.5;
    opacity: .85;
}

.zx-splash-spinner {
    width: 1.5rem;
    height: 1.5rem;
    border: 2px solid rgba(255, 255, 255, .3);
    border-top-color: #FFFFFF;
    border-radius: 50%;
    animation: zx-spin .9s linear infinite;
}

.zx-splash-actions {
    display: flex;
    gap: .75rem;
}

.zx-splash-actions button {
    padding: .5rem 1.1rem;
    border: 1px solid rgba(255, 255, 255, .6);
    border-radius: 999px;
    background: transparent;
    color: #FFFFFF;
    font: inherit;
    cursor: pointer;
}

.zx-splash-actions button.zx-primary {
    background: #FFFFFF;
    color: #033E8C;
}

@keyframes zx-spin {
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    .zx-splash-spinner { animation-duration: 3s; }
}

/* Welcome screen of the setup: the logo on brand blue, like the start screen */
.zx-welcome .zx-logo--wordmark {
    width: min(22rem, 72vw);
    height: auto;
}

.zx-welcome .zx-logo-ink {
    fill: #FFFFFF;
}

.zx-welcome .zx-logo-accent {
    fill: #8FBBFF;
}

.zx-welcome-title {
    margin: 1rem 0 0;
    font-size: var(--pg-fs-title1, 1.75rem);
    font-weight: var(--pg-fw-bold, 700);
    letter-spacing: -.02em;
}

.zx-welcome-text {
    max-width: 30rem;
    margin: 0;
    font-size: var(--pg-fs-body);
    line-height: 1.5;
    opacity: .85;
}

.zx-welcome-button {
    margin-top: 1rem;
    padding: .75rem 2rem;
    border: 0;
    border-radius: 999px;
    background: #FFFFFF;
    color: #033E8C;
    font: inherit;
    font-weight: var(--pg-fw-semibold, 600);
    cursor: pointer;
    transition: transform var(--pg-dur-1) var(--pg-ease), box-shadow var(--pg-dur-2) var(--pg-ease);
}

.zx-welcome-button:hover {
    box-shadow: 0 6px 24px rgba(0, 0, 0, .25);
}

.zx-welcome-button:active {
    transform: scale(.97);
}

.zx-welcome-button:focus-visible {
    outline: 2px solid #FFFFFF;
    outline-offset: 3px;
}

/* Wizard footer: back on the left, next on the right */
.zx-wizard-nav {
    display: flex;
    justify-content: space-between;
    gap: .75rem;
    margin-top: var(--pg-space-6);
}

.zx-wizard-done {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .75rem;
    padding: 2rem 1rem;
    text-align: center;
}

.zx-wizard-done .rzi {
    font-size: 3.5rem;
    color: var(--pg-green);
}

/* File upload as a button (the browser's own control speaks the browser's language) */
.zx-file-button {
    position: relative;
    cursor: pointer;
}

.zx-file-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.zx-file-button:focus-within {
    outline: 2px solid var(--pg-accent);
    outline-offset: 2px;
}

/* License file: the button, below it the text to paste */
.zx-license-input {
    display: grid;
    justify-items: start;
    gap: .75rem;
}

.zx-activation-input {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    align-items: center;
}

.zx-activation-input .zx-activation-key {
    flex: 1 1 16rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    text-transform: uppercase;
}

.zx-license-input .zx-license-text {
    width: 100%;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: .8rem;
}

/* Login (web): the welcome screen with a card */
.zx-login .zx-login-card {
    display: grid;
    gap: .75rem;
    width: min(22rem, 100%);
    padding: 1.5rem;
    border-radius: 1.25rem;
    background: var(--pg-bg-elevated, #FFFFFF);
    color: var(--pg-label);
    text-align: start;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
}

.zx-login .zx-login-button {
    margin-top: .5rem;
    background: #033E8C;
    color: #FFFFFF;
}

/* Signed-in user at the foot of the sidebar */
.zx-user-menu {
    display: flex;
    align-items: center;
    gap: .25rem;
    margin-bottom: .5rem;
    padding: .25rem .25rem .25rem .5rem;
    border-radius: .75rem;
    background: var(--pg-fill, rgba(120, 120, 128, .12));
    font-size: var(--pg-fs-footnote);
}

.zx-user-name {
    flex: 1;
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.zx-user-signout {
    display: grid;
    place-items: center;
    width: 1.75rem;
    height: 1.75rem;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--pg-label-2);
    cursor: pointer;
}

.zx-user-signout:hover {
    background: var(--pg-fill, rgba(120, 120, 128, .12));
    color: var(--pg-label);
}

.zx-login .zx-login-where {
    font-size: var(--pg-fs-footnote);
    text-align: center;
}

/* Working in another company (ActingCompanyBanner) */
.zx-acting-banner {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .5rem;
    margin-bottom: var(--pg-space-4, 1rem);
    padding: .6rem 1rem;
    border-radius: .875rem;
    background: color-mix(in srgb, var(--pg-orange, #FF9500) 16%, transparent);
    color: var(--pg-label);
    font-size: var(--pg-fs-subheadline);
}

.zx-acting-banner .rzi {
    color: var(--pg-orange, #FF9500);
}

.zx-acting-banner button {
    margin-inline-start: auto;
    padding: .3rem .8rem;
    border: 0;
    border-radius: 999px;
    background: var(--pg-bg-elevated, #FFFFFF);
    color: var(--pg-accent);
    font: inherit;
    font-weight: var(--pg-fw-semibold, 600);
    cursor: pointer;
}

/* The connection step shows its cards side by side */
.zx-onboarding--wide {
    max-width: 62rem;
}
