﻿.scalable-time-spent-container
{
    width: 110px;
}

.static-time-spent-container {
    width: 110px;
}

.chr-vertical-align-middle {
    vertical-align: middle
}

.mud-input {
    font-size: 0.9rem !important;
}

.chr-horizontal-center {
    display: block;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.chr-vertical-center {
    position: relative;
    top: 50%;
    transform: translateY(-50%);
}

/*
 * A link in the full-height layout chain: a flex column that fills its parent.
 * Applied to MudMainContent (height comes from its own 100vh) and the @Body
 * wrapper so the chain has a definite height to hand down. Pages flow naturally
 * by default (content-height, top-aligned); a page that wants to fill the
 * viewport opts in by adding `flex-grow-1` to its own root (see WorklogListPage).
 */
.chr-fill-height {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
}

.chr-white {
    color: white !important;
}

:root {
    --mud-drawer-width-left: 180px !important;
}

.chr-not-display-on-600 {
}

.chr-not-display-on-480 {
}

/*
 * Chronos mark in the AppBar (issue #226). Inlined in MainLayout rather than loaded as an
 * <img> so `currentColor` resolves against the AppBar's own text colour — an SVG in an <img>
 * is an isolated document and would fall back to black. Deliberately NOT tagged with
 * chr-not-display-on-480: below 480px the name is hidden and the mark is all that carries
 * the brand, so it has to survive on its own.
 */
.chr-brand-mark {
    width: 28px;
    height: 28px;
    flex: none;
}

.chr-worklog-day-chips-container {
    width: 375px
}

.chr-worklog-day-item-dialog {
    width: 475px
}

@media (max-width:320px) { /* smartphones, portrait iPhone, portrait 480x320 phones (Android) */
}

@media (max-width:480px) { /* smartphones, Android phones, landscape iPhone */
    .chr-not-display-on-480 {
        display: none;
    }

    .chr-worklog-day-chips-container {
        width: 300px
    }

    .chr-worklog-day-item-dialog {
        width: 300px
    }
}

@media (max-width:600px) { /* portrait tablets, portrait iPad, e-readers (Nook/Kindle), landscape 800x480 phones (Android) */
    .chr-not-display-on-600 {
        display: none;
    }
}

@media (max-width:801px) { /* tablet, landscape iPad, lo-res laptops ands desktops */
    .scalable-time-spent-container {
        width: 100%;
    }
}

@media (max-width:1025px) { /* big landscape tablets, laptops, and desktops */
}

@media (max-width:1281px) { /* hi-res laptops and desktops */
}

/* ============================================================
   EXTENSIONS — "Glow deck"
   Theme-aware extensions console. All colors come from MudBlazor
   palette CSS variables (--mud-palette-*), so it follows the
   active light/dark theme automatically.
   ============================================================ */
.extv-glow__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}
.extv-glow__outer {
    padding-bottom: 5px;
}
.extv-glow__card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 210px;
    padding: 22px;
    border-radius: 16px;
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
    overflow: hidden;
    transition: transform .3s cubic-bezier(.2,.7,.2,1), border-color .3s ease, box-shadow .3s ease;
}
.extv-glow__card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(90% 70% at 50% -10%, rgba(var(--mud-palette-primary-rgb), .12), transparent 70%);
    opacity: 0;
    transition: opacity .3s ease;
    pointer-events: none;
}
.extv-glow__outer:hover .extv-glow__card {
    transform: translateY(-5px);
    border-color: var(--mud-palette-primary);
    box-shadow: 0 18px 40px -20px rgba(var(--mud-palette-primary-rgb), .55);
}
.extv-glow__outer:hover .extv-glow__card::before { opacity: 1; }
.extv-glow__card--on { border-color: rgba(var(--mud-palette-success-rgb), .5); }
.extv-glow__card--soon { border-style: dashed; }
.extv-glow__card-top { display: flex; align-items: flex-start; justify-content: space-between; }
.extv-glow__icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    color: var(--mud-palette-primary);
    background: rgba(var(--mud-palette-primary-rgb), .12);
    border: 1px solid rgba(var(--mud-palette-primary-rgb), .25);
}
.extv-glow__card--on .extv-glow__icon {
    color: var(--mud-palette-success);
    background: rgba(var(--mud-palette-success-rgb), .12);
    border-color: rgba(var(--mud-palette-success-rgb), .3);
}
.extv-glow__status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: .66rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .12em;
}
.extv-glow__led { width: 7px; height: 7px; border-radius: 50%; }
.extv-glow__status--connected { color: var(--mud-palette-success); background: rgba(var(--mud-palette-success-rgb), .1); }
.extv-glow__status--connected .extv-glow__led {
    background: var(--mud-palette-success);
    box-shadow: 0 0 9px var(--mud-palette-success);
    animation: ext-pulse 1.8s ease-in-out infinite;
}
.extv-glow__status--available { color: var(--mud-palette-info); background: rgba(var(--mud-palette-info-rgb), .1); }
.extv-glow__status--available .extv-glow__led { background: var(--mud-palette-info); }
.extv-glow__status--soon { color: var(--mud-palette-warning); background: rgba(var(--mud-palette-warning-rgb), .12); }
.extv-glow__status--soon .extv-glow__led { background: var(--mud-palette-warning); }
.extv-glow__status--off { color: var(--mud-palette-text-secondary); background: rgba(128, 128, 128, .12); }
.extv-glow__status--off .extv-glow__led { background: var(--mud-palette-text-secondary); }
.extv-glow__readout {
    display: flex;
    flex-wrap: wrap;
    gap: 26px;
    margin-top: 18px;
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--mud-palette-text-secondary);
}
.extv-glow__readout b { color: var(--mud-palette-primary); font-size: 1rem; font-weight: 700; }
.extv-glow__foot {
    margin-top: auto;
    padding-top: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-top: 1px solid var(--mud-palette-divider);
}

/* Nav badge */
.nav-badge--new {
    display: inline-flex;
    align-items: center;
    margin-left: 7px;
    padding: 1px 5px;
    border-radius: 999px;
    font-size: .5rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .1em;
    line-height: 1.6;
    color: var(--mud-palette-primary);
    background: rgba(var(--mud-palette-primary-rgb), .1);
    border: 1px solid rgba(var(--mud-palette-primary-rgb), .3);
    box-shadow: 0 0 6px rgba(var(--mud-palette-primary-rgb), .35);
    animation: nav-badge-pulse 2.4s ease-in-out infinite;
}
@keyframes nav-badge-pulse {
    0%, 100% { box-shadow: 0 0 6px rgba(var(--mud-palette-primary-rgb), .35); }
    50%       { box-shadow: 0 0 12px rgba(var(--mud-palette-primary-rgb), .65), 0 0 18px rgba(var(--mud-palette-primary-rgb), .2); }
}
@keyframes ext-pulse {
    0%, 100% { box-shadow: 0 0 9px var(--mud-palette-success); }
    50%       { box-shadow: 0 0 16px var(--mud-palette-success), 0 0 24px rgba(var(--mud-palette-success-rgb), .4); }
}

/* ============================================================
   Features section ("Новинки") — reuses the .extv-glow card
   language; only the feature-specific bits live here.
   ============================================================ */
.chr-section-head {
    max-width: 720px;
}
.feat-card {
    cursor: pointer;
}
.feat-card__preview {
    color: var(--mud-palette-text-secondary);
    font-size: .9rem;
    line-height: 1.5;
}
.feat-card__preview .mud-markdown-body p { margin-bottom: 0; }
.feat-card__date {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .78rem;
    color: var(--mud-palette-text-secondary);
}
.feat-card__date-icon { opacity: .55; }
.feat-page__skeleton { border-radius: 16px; }

/* Latest-features promo shown in the worklog empty state */
/* The worklog empty state centers text; keep the promo left-aligned like /features. */
.feat-promo, .feat-card { text-align: left; }
.feat-widget__eyebrow {
    font-size: .66rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--mud-palette-primary);
}
.feat-promo__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.feat-promo__all {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: .85rem;
    font-weight: 600;
    white-space: nowrap;
}

/* ------------------------------------------------------------
   Bento layout for the latest-features promo.
   Narrow screens: a plain vertical stack.
   Wide screens: the first feature becomes a tall "hero" panel
   on the left; the remaining cards stack on the right.
   ------------------------------------------------------------ */
.feat-promo__bento {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}
.feat-promo__bento > .extv-glow__outer {
    min-width: 0; /* let grid items shrink instead of overflowing */
    animation: feat-rise .5s cubic-bezier(.2,.7,.2,1) both;
}
.feat-promo__bento > .extv-glow__outer:nth-child(1) { animation-delay: .04s; }
.feat-promo__bento > .extv-glow__outer:nth-child(2) { animation-delay: .12s; }
.feat-promo__bento > .extv-glow__outer:nth-child(3) { animation-delay: .20s; }

@keyframes feat-rise {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: none; }
}

@media (min-width: 1000px) {
    .feat-promo__bento[data-count="3"] {
        grid-template-columns: 1.55fr 1fr;
        grid-template-rows: repeat(2, minmax(0, 1fr));
    }
    .feat-promo__bento[data-count="3"] > .extv-glow__outer:first-child {
        grid-row: 1 / span 2;
    }
    .feat-promo__bento[data-count="2"] {
        grid-template-columns: 1.55fr 1fr;
    }
    /* Hero cell stretches; make the card fill its full height. */
    .feat-promo__bento .extv-glow__outer--hero,
    .feat-promo__bento .extv-glow__outer--hero .extv-glow__card {
        height: 100%;
    }
}

/* Hero card enrichment */
.extv-glow__card--hero {
    background:
        radial-gradient(120% 90% at 100% 0%, rgba(var(--mud-palette-primary-rgb), .16), transparent 58%),
        var(--mud-palette-surface);
    border-color: rgba(var(--mud-palette-primary-rgb), .35);
}
.extv-glow__card--hero .extv-glow__icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
}
.extv-glow__card--hero .feat-card__preview {
    font-size: .95rem;
    max-width: 46ch;
}
.extv-glow__ghost {
    position: absolute;
    top: -34px;
    right: -26px;
    width: 200px !important;
    height: 200px !important;
    color: rgba(var(--mud-palette-primary-rgb), .07);
    transform: rotate(-8deg);
    pointer-events: none;
    z-index: 0;
}
.extv-glow__card--hero > *:not(.extv-glow__ghost) {
    position: relative;
    z-index: 1;
}

/* Tag chips (hero only) */
.feat-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}
.feat-card__tag {
    padding: 3px 11px;
    border-radius: 999px;
    font-size: .7rem;
    font-weight: 600;
    letter-spacing: .02em;
    color: var(--mud-palette-text-secondary);
    background: rgba(128, 128, 128, .1);
    border: 1px solid var(--mud-palette-lines-default);
}

@media (prefers-reduced-motion: reduce) {
    .feat-promo__bento > .extv-glow__outer { animation: none; }
}

/* ------------------------------------------------------------
   Features catalog page: a full-width hero banner for the top
   feature, followed by the standard responsive card grid.
   ------------------------------------------------------------ */
.feat-catalog {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.feat-hero {
    position: relative;
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 30px;
    border-radius: 20px;
    cursor: pointer;
    overflow: hidden;
    background:
        radial-gradient(90% 130% at 100% -10%, rgba(var(--mud-palette-primary-rgb), .18), transparent 55%),
        var(--mud-palette-surface);
    border: 1px solid rgba(var(--mud-palette-primary-rgb), .32);
    transition: transform .3s cubic-bezier(.2,.7,.2,1), border-color .3s ease, box-shadow .3s ease;
    animation: feat-rise .5s cubic-bezier(.2,.7,.2,1) both;
}
.feat-hero:hover {
    transform: translateY(-4px);
    border-color: var(--mud-palette-primary);
    box-shadow: 0 26px 55px -26px rgba(var(--mud-palette-primary-rgb), .6);
}
.feat-hero__body {
    position: relative;
    z-index: 1;
    min-width: 0;
    max-width: 680px;
}
.feat-hero__badge { margin-bottom: 14px; }
.feat-hero__title { line-height: 1.15; }
.feat-hero__preview { font-size: 1rem; max-width: 62ch; }
.feat-hero__foot {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}

/* Decorative "orb" artwork — hidden on narrow screens, revealed when wide. */
.feat-hero__art { display: none; }

@media (min-width: 1000px) {
    .feat-hero {
        grid-template-columns: 1.5fr .85fr;
        align-items: center;
        padding: 40px 46px;
    }
    .feat-hero__art {
        position: relative;
        display: grid;
        place-items: center;
        align-self: stretch;
        min-height: 210px;
    }
    .feat-hero__art::before,
    .feat-hero__art::after {
        content: "";
        position: absolute;
        top: 50%;
        left: 50%;
        border-radius: 50%;
        transform: translate(-50%, -50%);
        pointer-events: none;
    }
    .feat-hero__art::before {
        width: 270px;
        height: 270px;
        border: 1px solid rgba(var(--mud-palette-primary-rgb), .18);
    }
    .feat-hero__art::after {
        width: 190px;
        height: 190px;
        background: radial-gradient(circle, rgba(var(--mud-palette-primary-rgb), .16), transparent 70%);
    }
    .feat-hero__art-glyph {
        position: relative;
        z-index: 1;
        width: 150px !important;
        height: 150px !important;
        color: rgba(var(--mud-palette-primary-rgb), .55);
        filter: drop-shadow(0 10px 34px rgba(var(--mud-palette-primary-rgb), .4));
        animation: feat-hero-float 6s ease-in-out infinite;
    }
}

@keyframes feat-hero-float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-9px); }
}

@media (prefers-reduced-motion: reduce) {
    .feat-hero { animation: none; }
    .feat-hero__art-glyph { animation: none; }
}

/* Feature detail dialog */
.feat-detail__meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .82rem;
    color: var(--mud-palette-text-secondary);
}
.feat-detail__meta-icon { opacity: .6; color: var(--mud-palette-primary); }
.feat-detail__dot { opacity: .5; }

/* Tooltip markdown (ComponentMarkdownViewer). Scoped to a custom class so it
   does not leak to other .mud-markdown-body content on the page. */
.chr-component-markdown .mud-markdown-body p {
    margin-bottom: 0em !important;
    text-align: left !important;
    font-size: small !important;
    max-width: 300px;
}
/* Tame MudMarkdown heading sizes inside the detail dialog. */
.feat-detail .mud-markdown-body h1 { font-size: 1.6rem; font-weight: 700; margin: .2rem 0 .6rem; }
.feat-detail .mud-markdown-body h2 { font-size: 1.2rem; font-weight: 600; margin: 1rem 0 .4rem; }
.feat-detail .mud-markdown-body h3 { font-size: 1.05rem; font-weight: 600; margin: .8rem 0 .3rem; }
.feat-detail .mud-markdown-body img { max-width: 100%; border-radius: 8px; }

/* Releases section (/releases) */
.rel-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.rel-page__skeleton { border-radius: 16px; }

/* Releases load-failure state: point the user at GitHub directly. */
.rel-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
    padding: 56px 24px;
    border: 1px dashed var(--mud-palette-lines-default);
    border-radius: 18px;
}
.rel-error__icon {
    width: 56px;
    height: 56px;
    color: var(--mud-palette-text-secondary);
    opacity: .6;
    margin-bottom: 4px;
}
.rel-error__title { font-weight: 700; }
.rel-error__text {
    max-width: 42ch;
    color: var(--mud-palette-text-secondary);
}
.rel-card {
    position: relative;
    padding: 24px;
    border-radius: 18px;
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
    transition: transform .25s cubic-bezier(.2,.7,.2,1), border-color .25s ease, box-shadow .25s ease;
    animation: feat-rise .5s cubic-bezier(.2,.7,.2,1) both;
    text-align: left;
}
.rel-card:hover {
    transform: translateY(-3px);
    border-color: rgba(var(--mud-palette-primary-rgb), .5);
    box-shadow: 0 22px 48px -26px rgba(var(--mud-palette-primary-rgb), .5);
}
.rel-card__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.rel-card__title-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}
.rel-card__title { line-height: 1.2; }
.rel-card__tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    align-self: flex-start;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: .74rem;
    font-weight: 600;
    font-family: var(--mud-typography-monospace-family, monospace);
    color: var(--mud-palette-primary);
    background: rgba(var(--mud-palette-primary-rgb), .1);
}
.rel-card__tag-icon { opacity: .7; }
.rel-card__badge { flex-shrink: 0; }
.rel-card__body {
    color: var(--mud-palette-text-secondary);
    font-size: .9rem;
    line-height: 1.55;
}
.rel-card__body .mud-markdown-body img { max-width: 100%; border-radius: 8px; }
.rel-card__body .mud-markdown-body h1,
.rel-card__body .mud-markdown-body h2,
.rel-card__body .mud-markdown-body h3 { font-size: 1.05rem; font-weight: 600; margin: .8rem 0 .3rem; }
.rel-card__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.rel-card__date {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .78rem;
    color: var(--mud-palette-text-secondary);
}
.rel-card__date-icon { opacity: .55; }

/* ============================================================
   Blazor Server reconnection overlay (#components-reconnect-modal),
   rendered in _Host.cshtml outside the Blazor tree. Colors use
   --mud-palette-* — they cascade here, so the overlay follows the app's
   light/dark theme. MudBlazor ships its own styles for this id and loads
   AFTER this file, hence the body-scoped scrim override below.
   ============================================================ */
#components-reconnect-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10001;
    align-items: center;
    justify-content: center;
    padding: 24px;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    animation: chr-rc-fade .2s ease both;
}
/* body-scoped + !important to outrank MudBlazor's background-color:!important,
   so the overlay dims the page instead of filling it solid. */
body #components-reconnect-modal {
    background: rgba(0, 0, 0, .55) !important;
}
#components-reconnect-modal.components-reconnect-show,
#components-reconnect-modal.components-reconnect-failed,
#components-reconnect-modal.components-reconnect-rejected {
    display: flex;
}
/* 1s grace before the overlay fades in, so brief blips that reconnect within it
   never flash the modal. Only 'show' is delayed; the terminal states appear at
   once. Disappearance is instant — removing the class drops it to display:none,
   there is no fade-out. */
#components-reconnect-modal.components-reconnect-show {
    animation-delay: 1s;
    pointer-events: none;
}

.chr-rc__dialog {
    width: 100%;
    max-width: 380px;
    padding: 32px 28px;
    border-radius: 18px;
    text-align: center;
    background: var(--mud-palette-surface);
    color: var(--mud-palette-text-primary);
    border: 1px solid var(--mud-palette-lines-default);
    box-shadow: 0 24px 60px -18px rgba(0, 0, 0, .5);
    animation: chr-rc-pop .25s cubic-bezier(.2,.7,.2,1) both;
}

/* Show only the block for the current class; 'failed' and 'rejected' share the
   reload block (both mean state is unrecoverable). */
.chr-rc__state { display: none; }
#components-reconnect-modal.components-reconnect-show .chr-rc__state--show { display: block; }
#components-reconnect-modal.components-reconnect-failed .chr-rc__state--reload,
#components-reconnect-modal.components-reconnect-rejected .chr-rc__state--reload { display: block; }

.chr-rc__title {
    margin: 18px 0 8px;
    font-size: 1.15rem;
    font-weight: 600;
}
.chr-rc__text {
    margin: 0;
    font-size: .9rem;
    line-height: 1.5;
    color: var(--mud-palette-text-secondary);
}
.chr-rc__attempt {
    display: block;
    margin-top: 10px;
    font-size: .8rem;
    color: var(--mud-palette-text-secondary);
    opacity: .8;
}

.chr-rc__spinner {
    width: 52px;
    height: 52px;
    margin: 0 auto;
    border-radius: 50%;
    border: 4px solid rgba(var(--mud-palette-primary-rgb), .18);
    border-top-color: var(--mud-palette-primary);
    animation: chr-rc-spin .8s linear infinite;
}

.chr-rc__icon {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    margin: 0 auto;
    border-radius: 50%;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--mud-palette-primary);
    background: rgba(var(--mud-palette-primary-rgb), .12);
}

/* id-scoped to beat MudBlazor's own button rule (uppercase + 40px auto margin). */
#components-reconnect-modal .chr-rc__btn {
    display: block;
    margin: 22px auto 0 !important;
    padding: 10px 26px;
    border: none;
    border-radius: 999px;
    font-size: .9rem;
    font-weight: 600;
    font-family: inherit;
    text-transform: none;
    letter-spacing: normal;
    color: #fff;
    background: var(--mud-palette-primary);
    cursor: pointer;
    transition: background-color .2s ease, box-shadow .2s ease, transform .1s ease;
    box-shadow: 0 8px 20px -8px rgba(var(--mud-palette-primary-rgb), .8);
}
#components-reconnect-modal .chr-rc__btn:hover {
    background: var(--mud-palette-primary-darken);
    box-shadow: 0 10px 26px -8px rgba(var(--mud-palette-primary-rgb), .9);
}
#components-reconnect-modal .chr-rc__btn:active { transform: translateY(1px); }

@keyframes chr-rc-spin { to { transform: rotate(360deg); } }
@keyframes chr-rc-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes chr-rc-pop {
    from { opacity: 0; transform: translateY(12px) scale(.97); }
    to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    #components-reconnect-modal,
    .chr-rc__dialog { animation: none; }
    .chr-rc__spinner { animation-duration: 2s; }
}

