.timer {
    text-align: center;
    font-family: 'Raleway', monospace;
}

.timer__countdown {
    font-size: 4rem;
    font-weight: 600;
    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;
    -webkit-mask-image: linear-gradient(
        to bottom,
        transparent 0%,
        black 15%,
        black 85%,
        transparent 100%
    );
    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 {
    font-size: 2rem;
    color: var(--color-text-muted, #888);
    margin-bottom: 0.5rem;
}

.timer__code {
    font-size: 1.25rem;
    color: var(--color-text-muted, #888);
    font-family: monospace;
    letter-spacing: 0.1em;
    margin-top: 0.5rem;
}

.timer__code a {
    color: inherit;
    text-decoration: none;
}

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

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

.timer--negative .timer__countdown {
    color: var(--color-text-danger, #ff4444);
}

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

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

.timer__controls {
    margin-top: 1rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.timer__control-link {
    font-size: 1.5rem;
    color: var(--color-primary, #855cd6);
    text-decoration: none;
    cursor: pointer;
}

.timer__control-link:hover {
    color: var(--color-primary-active, #7547d1);
    text-decoration: underline;
}

.timer-full-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--color-bg, #1a1a1a);
    color: var(--color-text-normal, #fff);
}

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

.timer-full-page .timer__name {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.timer-full-page .timer__code {
    font-size: 1.25rem;
}

.timer-deleted {
    text-align: center;
    padding: 2rem;
    color: var(--color-text-muted, #888);
}

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

.timer__message {
    font-size: 1.25rem;
    color: var(--color-text-muted, #888);
    margin-top: 1rem;
}

.timer-full-page .timer__message {
    font-size: 1.5rem;
}
