/* Shared look options for the counter embeds, switched on by /assets/global/obs/overlay.js.
   Only classes on <html> are used, so an embed without options looks exactly as before.
   The one exception: the count never wraps, overlay.js shrinks it to fit the widget instead. */

main .odometer {
    white-space: nowrap;
}

html.lc-ov-dark main *,
html.lc-ov-dark .lc-goal {
    color: #ffffff !important;
}
html.lc-ov-dark main,
html.lc-ov-dark .lc-goal {
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
}

html.lc-ov-color main *,
html.lc-ov-color .lc-goal {
    color: var(--lc-ov-color) !important;
}

html.lc-ov-bg,
html.lc-ov-bg body {
    background: var(--lc-ov-bg) !important;
}

html.lc-ov-font main *,
html.lc-ov-font .lc-goal,
html.lc-ov-font .lc-goal * {
    font-family: var(--lc-ov-font), system-ui, sans-serif !important;
}

/* scale=2 and friends: drawn bigger instead of stretched in OBS, so text stays sharp */
html.lc-ov-scale body {
    transform: scale(var(--lc-ov-scale));
    transform-origin: 0 0;
}

/* The goal bar sits below the widget box, outside the body's own height: only the page
   (the OBS source) clips, never the body, and there are never scrollbars */
html.lc-ov-goal,
html.lc-ov-scale {
    overflow: hidden !important;
}
html.lc-ov-goal body,
html.lc-ov-scale body {
    overflow: visible !important;
}

html.lc-ov-font main * {
    font-variant-numeric: tabular-nums;
}

/* Goal bar: placed by overlay.js right under the widget, as wide as the widget */
.lc-goal {
    position: absolute;
    left: 0;
    top: 90px;
    width: 300px;
    color: #24292e;
    font: 600 15px/1.25 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
.lc-goal[hidden] {
    display: none;
}
.lc-goal-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    white-space: nowrap;
}
.lc-goal-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}
.lc-goal-left {
    flex: none;
    font-variant-numeric: tabular-nums;
}
.lc-goal-track {
    height: 12px;
    margin-top: 6px;
    border-radius: 999px;
    background: rgba(128, 128, 128, 0.3);
    overflow: hidden;
}
.lc-goal-fill {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: var(--lc-ov-accent, #ff4757);
    transition: width 0.8s ease;
}
.lc-goal.is-wrap .lc-goal-row {
    flex-wrap: wrap;
    row-gap: 2px;
}
.lc-goal.is-wrap .lc-goal-label {
    flex: 1 1 100%;
}
.lc-goal.is-text .lc-goal-track {
    display: none;
}
.lc-goal.is-done .lc-goal-left {
    color: var(--lc-ov-accent, #ff4757);
}
html.lc-ov-dark .lc-goal.is-done .lc-goal-left,
html.lc-ov-color .lc-goal.is-done .lc-goal-left {
    color: var(--lc-ov-accent, #ff4757) !important;
}

@media (prefers-reduced-motion: reduce) {
    .lc-goal-fill { transition: none; }
}
