/* Font sizes per MudBlazor breakpoint (xs < 600px, sm 600-959px, md >= 960px). */

/* Header */
.cm-logo { height: 41px; flex-shrink: 0; filter: brightness(0) invert(1); }
.cm-title { font-size: 27px; white-space: nowrap; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.cm-time { font-size: 13px; white-space: nowrap; }

/* Cards */
.cm-set { font-size: 20px; font-weight: 700; padding: 5px 0; overflow-wrap: anywhere; }
.cm-name { font-size: 16px; min-width: 0; overflow-wrap: anywhere; }
.cm-value { font-size: 24px; font-weight: 700; white-space: nowrap; flex-shrink: 0; padding-left: 8px; }

@media (max-width: 959.98px) {
    .cm-logo { height: 28px; }
    .cm-title { font-size: 20px; }
}

@media (max-width: 599.98px) {
    .cm-logo { height: 14px; }
    .cm-title { font-size: 13px; }
    .cm-time { font-size: 12px; }
    .cm-set { font-size: 17px; }
    .cm-name { font-size: 14px; }
    .cm-value { font-size: 20px; }
}

/* ---------- V1 design: look of the original app (default) ---------- */
/* .v1-dark is added in dark mode (the original had no dark mode). */
.v1-bg { background-color: #4B4B4B; }
.v1-bg.v1-dark { background-color: var(--mud-palette-background); }
.mud-appbar.v1-bar { left: 0; right: 0; margin: 0 auto; max-width: 1200px; width: 100%; box-shadow: none;
    background-color: #fff !important; color: #4B4B4B !important; border-bottom: 4px solid rgb(255, 128, 52); }
.mud-appbar.v1-bar.v1-dark { background-color: var(--mud-palette-surface) !important; color: var(--mud-palette-text-primary) !important; }
.v1-bar .mud-typography, .v1-foot .mud-typography { color: inherit; }
.v1-bar .cm-logo { filter: brightness(0) saturate(100%) invert(28%) sepia(0%) saturate(0%) brightness(95%); }
.v1-bar.v1-dark .cm-logo { filter: brightness(0) invert(1); }
.v1-col, .v1-foot { background-color: #fff; color: #4B4B4B; font-family: Verdana, sans-serif; }
.v1-col.v1-dark, .v1-foot.v1-dark { background-color: var(--mud-palette-surface); color: var(--mud-palette-text-primary); }
.v1-foot { max-width: 1200px; width: 100%; margin: 0 auto; min-height: 40px; border-top: 1px solid gainsboro; }
.v1-foot.v1-dark { border-top-color: var(--mud-palette-lines-default); }
.v1-foot a { color: inherit; }

/* Counters: as in the original Monitor.less (10pt base; set 0.8em, name 1.4em, value 1.1em). */
.v1 { font-family: Verdana, sans-serif; font-size: calc(10pt * 0.8); line-height: 1.42857; }
.v1-set { padding: 5px 10px; }
.v1-setname { font-size: 1.4em; font-weight: 700; padding: 5px 0; overflow-wrap: anywhere; }
.v1-desc { font-size: 10px; overflow-wrap: anywhere; }
.v1-grid { display: grid; grid-template-columns: 1fr; column-gap: 30px; }
.v1-pair { display: flex; }
.v1-name { font-size: 13px; flex: 0 0 75%; min-width: 0; overflow-wrap: anywhere; margin-right: -1px; margin-top: -1px;
    padding: 10px 5px 8px; border: 1px solid rgb(255, 128, 52); border-right: none; }
.v1-value { flex: 0 0 25%; min-width: max-content; font-size: 1.1em; font-weight: 700; text-align: right; white-space: nowrap; margin-top: -1px;
    padding: 10px 5px 8px; background-color: rgba(255, 128, 52, .05); border: 1px solid rgb(255, 128, 52); }

@media (min-width: 768px) { .v1-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 992px) { .v1-grid { grid-template-columns: 1fr 1fr 1fr; } }

/* ---------- V3 design: tiles ---------- */

/* Header: live status pill */
.v3-pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .25); font-size: 13px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.v3-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; background-color: var(--mud-palette-success); }
.v3-delayed .v3-dot { background-color: var(--mud-palette-warning); }
.v3-error .v3-dot { background-color: var(--mud-palette-error); }
.v3-pulse .v3-dot { animation: v3-pulse .7s ease-in-out infinite alternate; }
@keyframes v3-pulse { from { opacity: 1; transform: scale(1); } to { opacity: .35; transform: scale(1.35); } }

/* Counter sets and tiles */
.v3-section { margin-bottom: 28px; }
.v3-head { border-bottom: 2px solid var(--mud-palette-primary); padding-bottom: 4px; margin-bottom: 12px; }
.v3-set { font-size: 22px; font-weight: 700; overflow-wrap: anywhere; }
.v3-desc { font-size: 13px; color: var(--mud-palette-text-secondary); overflow-wrap: anywhere; }
.v3-tile { height: 100%; padding: 14px 8px 12px; border-radius: 10px; text-align: center;
    background-color: var(--mud-palette-surface); border-color: var(--mud-palette-lines-default); }
.v3-value { font-size: 40px; font-weight: 700; line-height: 1.15; color: var(--mud-palette-primary);
    font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v3-value.v3-empty { font-weight: 400; color: var(--mud-palette-text-disabled); }
.v3-name { font-size: 14px; line-height: 1.3; margin-top: 4px; color: var(--mud-palette-text-secondary); overflow-wrap: anywhere;
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }

/* Change highlight: two identical animations, alternated per poll so the animation restarts. */
.v3-flash-a { animation: v3-flash-a 1.5s ease-out; }
.v3-flash-b { animation: v3-flash-b 1.5s ease-out; }
@keyframes v3-flash-a { from { background-color: rgba(var(--mud-palette-primary-rgb), .4); } }
@keyframes v3-flash-b { from { background-color: rgba(var(--mud-palette-primary-rgb), .4); } }

@media (max-width: 959.98px) {
    .v3-value { font-size: 32px; }
}

@media (max-width: 599.98px) {
    .v3-pill { font-size: 12px; padding: 2px 8px; }
    /* Phones: one fixed size. */
    .v3-set { font-size: 19px; }
    .v3-value { font-size: 28px; }
    .v3-name { font-size: 14px; }
}
.v1-bar .v3-pill { border-color: rgba(75, 75, 75, .3); } /* pill on the white V1 header */
