/* ==========================================================================
   Home group (home, hour bank, public content): the few things the system in
   mvn-ui.css does not have yet. Tokens only, scoped to the group's pages
   (body.page-{templatefile}); the integrator folds them into mvn-ui.css.
   ========================================================================== */

/* A domain in a status sentence moves to the next line whole instead of breaking
   at its hyphen (a domain longer than the line still wraps). An underline does not
   reach into an inline block, so the domain takes its link's underline itself. */
html.mvn-ui :is(.page-clientareahome, .page-mvn-hours, .page-user-switch-account-forced) .mvn-lede bdi {
    display: inline-block;
    max-width: 100%;
    text-decoration: inherit;
}

/* Phones: the head's actions take the line, so their buttons fill it (section 9 gives the
   buttons flex: 1 1 auto, but .mvn-head-main aligns its children to the start, so the row
   was only as wide as its buttons). */
@media (max-width: 599.98px) {
    html.mvn-ui :is(.page-clientareahome, .page-mvn-hours, .page-user-switch-account, .page-user-switch-account-forced, .page-access-denied, .page-downloaddenied, .page-knowledgebasecat, .page-contact) .mvn-head-actions {
        align-self: stretch;
    }
}

/* Hour bank: the last twelve months as one column each, oldest at the start side.
   Markup: .mvn-chart > .mvn-chart-col[style="--mvn-fill: 40%"](.is-zero)
           > .mvn-chart-track > .mvn-chart-value + .mvn-chart-bar, then .mvn-chart-label */
html.mvn-ui .page-mvn-hours .mvn-chart {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-auto-rows: 100%;
    gap: var(--mvn-s-2);
    height: calc(var(--mvn-s-8) * 3);
    padding: var(--mvn-s-5) var(--mvn-frame-pad) var(--mvn-s-3);
}
html.mvn-ui .page-mvn-hours .mvn-chart-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--mvn-s-2);
    min-width: 0;
}
html.mvn-ui .page-mvn-hours .mvn-chart-track {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: var(--mvn-s-1);
    width: 100%;
    border-block-end: var(--mvn-hair) solid var(--mvn-rule);
}
html.mvn-ui .page-mvn-hours .mvn-chart-value {
    color: var(--mvn-ink-2);
    font-size: var(--mvn-t-micro);
    font-weight: var(--mvn-w-medium);
    font-variant-numeric: tabular-nums;
    line-height: 1;
}
html.mvn-ui .page-mvn-hours .mvn-chart-bar {
    width: 100%;
    max-width: var(--mvn-s-6);
    height: calc(var(--mvn-fill) * .82);
    border-radius: var(--mvn-r-sm) var(--mvn-r-sm) 0 0;
    background: var(--mvn-accent);
}
html.mvn-ui .page-mvn-hours .mvn-chart-col.is-zero .mvn-chart-bar {
    height: 0;
}
html.mvn-ui .page-mvn-hours .mvn-chart-label {
    color: var(--mvn-ink-3);
    font-size: var(--mvn-t-micro);
    line-height: 1;
    white-space: nowrap;
}
/* The search term in the work list */
html.mvn-ui .page-mvn-hours .mvn-rows mark {
    padding: 0;
    border-radius: var(--mvn-r-sm);
    background: var(--mvn-accent-wash);
    color: var(--mvn-ink);
}
@media (max-width: 599.98px) {
    html.mvn-ui .page-mvn-hours .mvn-chart {
        gap: var(--mvn-s-1);
        padding-inline: var(--mvn-s-3);
    }
    /* Twelve labels do not fit across a phone: they turn, all in one height so the bars share a baseline */
    html.mvn-ui .page-mvn-hours .mvn-chart-label {
        height: calc(var(--mvn-s-7) - var(--mvn-s-1));
        writing-mode: vertical-rl;
    }
}
@media print {
    html.mvn-ui .page-mvn-hours :is(.mvn-head-tools, [data-mvn-hours-more], [data-mvn-hours-out]) {
        display: none !important; /* print shows the rows, not the tools */
    }
}

/* Articles and announcements are HTML from the admin editor: a wide table scrolls inside the
   text instead of breaking its words letter by letter, and an embedded video keeps to the line. */
html.mvn-ui :is(.page-knowledgebasearticle, .page-viewannouncement) .mvn-prose table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
}
html.mvn-ui :is(.page-knowledgebasearticle, .page-viewannouncement) .mvn-prose :is(th, td) {
    overflow-wrap: normal;
}
html.mvn-ui :is(.page-knowledgebasearticle, .page-viewannouncement) .mvn-prose :is(iframe, video) {
    max-width: 100%;
}

/* ==========================================================================
   The focused home page (owner, 2026-11-04)
   ========================================================================== */

/* The head's one line about what waits: the alert in its tone, the sentence and its one button */
html.mvn-ui .page-clientareahome .mvn-home-alert {
    align-self: stretch;
    align-items: center;
    margin-block-start: var(--mvn-s-5);
    font-size: var(--mvn-t-body);
}
html.mvn-ui .page-clientareahome .mvn-home-alert > i:first-child {
    margin-block-start: 0;
}
/* The less important tier: a quiet line, no wash and no alarm color, its icon and words in line
   with the alert's above it */
html.mvn-ui .page-clientareahome .mvn-home-minor {
    display: flex;
    align-items: baseline;
    gap: var(--mvn-s-3);
    margin: var(--mvn-s-5) 0 0;
    padding-inline: var(--mvn-s-4);
    color: var(--mvn-ink-2);
    font-size: var(--mvn-t-body);
    line-height: var(--mvn-lh-lede);
}
html.mvn-ui .page-clientareahome .mvn-home-alert + .mvn-home-minor {
    margin-block-start: var(--mvn-s-3);
}
html.mvn-ui .page-clientareahome .mvn-home-minor > i {
    flex: none;
    width: var(--mvn-t-icon-md);
    color: var(--mvn-ink-3);
    font-size: var(--mvn-t-icon-md);
    text-align: center;
}
html.mvn-ui .page-clientareahome .mvn-home-minor a {
    color: var(--mvn-accent);
    font-weight: var(--mvn-w-medium);
    text-decoration: underline;
    text-decoration-color: var(--mvn-accent-line);
    text-underline-offset: var(--mvn-underline-gap);
}
html.mvn-ui .page-clientareahome .mvn-home-minor a:hover {
    color: var(--mvn-accent-strong);
    text-decoration-color: currentColor;
}

/* "החבילות שלי": a row's tag beside its name (.mvn-row-head, mvn-ui.css), its usage on the line under it */
html.mvn-ui .page-clientareahome .mvn-frame.is-packages .mvn-row {
    row-gap: var(--mvn-s-2);
    padding-block: var(--mvn-s-4);
}
/* The usage line runs under the whole row, so it stays one line */
html.mvn-ui .page-clientareahome .mvn-frame.is-packages .mvn-row > .mvn-usage {
    grid-column: 1 / -1;
    margin: 0;
}

/* A package's usage in one line (includes/mvn/usage.tpl): label, value, and from 80% the share in
   its tone beside a small bar */
html.mvn-ui .mvn-usage {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--mvn-s-1) var(--mvn-s-5);
    margin: var(--mvn-s-1) 0 0;
    padding: 0;
    color: var(--mvn-ink-2);
    font-size: var(--mvn-t-caption);
    line-height: var(--mvn-lh-ui);
    list-style: none;
    font-variant-numeric: tabular-nums;
}
html.mvn-ui .mvn-usage-item {
    display: inline-flex;
    align-items: center;
    gap: var(--mvn-s-2);
    white-space: nowrap;
}
html.mvn-ui .mvn-usage-label {
    color: var(--mvn-ink-3);
}
html.mvn-ui .mvn-usage-item bdi {
    color: var(--mvn-ink);
    font-weight: var(--mvn-w-medium);
}
html.mvn-ui .mvn-usage-item.is-warn :is(span, bdi):not(.mvn-usage-label) {
    color: var(--mvn-warn);
}
html.mvn-ui .mvn-usage-item.is-bad :is(span, bdi):not(.mvn-usage-label) {
    color: var(--mvn-bad);
}
html.mvn-ui .mvn-usage-bar {
    position: relative;
    display: inline-block;
    width: var(--mvn-s-7);
    height: var(--mvn-s-1);
    overflow: hidden;
    border-radius: var(--mvn-r-pill);
    background: var(--mvn-rule-soft);
}
html.mvn-ui .mvn-usage-bar::before {
    content: "";
    position: absolute;
    inset-block: 0;
    inset-inline-start: 0;
    width: var(--mvn-fill, 0%);
    border-radius: inherit;
    background: var(--mvn-ok);
}
html.mvn-ui .mvn-usage-item.is-warn .mvn-usage-bar::before {
    background: var(--mvn-warn);
}
html.mvn-ui .mvn-usage-item.is-bad .mvn-usage-bar::before {
    background: var(--mvn-bad);
}

/* "דומיינים": one line a domain on wide screens, its expiry beside its name */
@media (min-width: 600px) {
    html.mvn-ui .page-clientareahome .mvn-frame.is-compact .mvn-row {
        min-height: var(--mvn-s-7);
        padding-block: var(--mvn-s-2);
    }
    html.mvn-ui .page-clientareahome .mvn-frame.is-compact .mvn-row-main {
        flex-direction: row;
        align-items: baseline;
        gap: var(--mvn-s-3);
    }
    html.mvn-ui .page-clientareahome .mvn-frame.is-compact .mvn-row-title {
        flex: none;
    }
}

/* "תמיכה": the rest of the tickets and the hour bank in the frame's foot, beside its one action */
html.mvn-ui .page-clientareahome .mvn-frame.is-support > .mvn-frame-foot:first-child {
    border-block-start: 0;
}
html.mvn-ui .page-clientareahome .mvn-support-sum {
    display: flex;
    flex-wrap: wrap;
    gap: var(--mvn-s-1) var(--mvn-s-5);
    min-width: 0;
    color: var(--mvn-ink-2);
    font-size: var(--mvn-t-small);
}

@media (max-width: 599.98px) {
    html.mvn-ui .page-clientareahome .mvn-home-alert {
        flex-wrap: wrap;
    }
    html.mvn-ui .page-clientareahome .mvn-home-alert .mvn-alert-body {
        flex-basis: calc(100% - var(--mvn-s-7));
    }
    html.mvn-ui .page-clientareahome .mvn-home-alert > .mvn-btn {
        flex: 1 1 100%;
    }
}
