.timer {
    text-align: center;
}

.timer__countdown {
    font-size: 2.5rem;
    font-weight: var(--weight-semibold);
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.timer__countdown--sliding {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.timer__countdown[hx-get],
.timer__countdown[onclick] {
    cursor: pointer;
}

.timer__digit-slot {
    display: inline-block;
    height: 1.1em;
    width: 0.6em;
    overflow: hidden;
    position: relative;
    vertical-align: top;
    mask-image: linear-gradient(to bottom, transparent 0%, black 15%, black 85%, transparent 100%);
}

.timer__digit-track {
    display: block;
    transition: transform 0.3s ease-in-out;
}

.timer__digit {
    display: block;
    height: 1.1em;
    line-height: 1;
    text-align: center;
}

.timer__separator {
    display: inline-block;
    margin: 0 0.05em;
}

.timer__name {
    margin-bottom: var(--space-2);
    color: var(--color-text-muted);
    font-size: var(--text-xl);
}

.timer__code {
    margin-top: var(--space-2);
    color: var(--color-text-muted);
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    letter-spacing: 0.1em;
}

.timer__code a {
    color: inherit;
}

.timer__code a:hover {
    text-decoration: underline;
}

.timer--expired .timer__countdown,
.timer--not-found .timer__countdown {
    color: var(--color-text-muted);
}

.timer--negative .timer__countdown {
    color: var(--color-danger);
}

.timer__negative-sign {
    margin-right: 0.1em;
}

.timer--paused .timer__countdown {
    opacity: 0.6;
}

.timer__controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-4);
    margin-top: var(--space-4);
}

.timer__control {
    height: auto;
    padding: var(--space-1) var(--space-2);
    border: 0;
    background: none;
    color: var(--color-primary);
    font-size: var(--text-md);
    font-weight: var(--weight-regular);
    line-height: var(--leading-normal);
    letter-spacing: 0;
    text-transform: none;
}

.timer__control:hover,
.timer__control:focus {
    border: 0;
    color: var(--color-primary-hover);
    text-decoration: underline;
}

.timer__control--danger,
.timer__control--danger:hover,
.timer__control--danger:focus {
    color: var(--color-danger);
}

.timer-full-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0;
    background-color: var(--color-bg);
    color: var(--color-text);
}

.timer-full-page .timer__countdown {
    font-size: 20vw;
}

.timer-full-page .timer__name {
    margin-bottom: var(--space-4);
}

.timer-deleted {
    padding: var(--space-6);
    color: var(--color-text-muted);
    text-align: center;
}

.timer__message {
    margin-top: var(--space-4);
    color: var(--color-text-muted);
    font-size: var(--text-xs);
}

.timer-full-page .timer__message {
    font-size: var(--text-md);
}
