/* ================== */
/* # View: Timer      */
/* ================== */

/* ------- */
/* Content */
/* ------- */
.view-timer-content {
    container-type: size;

    width: 100cqw;
    height: 100cqh;
    overflow: hidden;

    display: grid;
    grid-template-columns: 100cqw;
    grid-template-rows: 84cqh 14cqh;
    gap: 2cqh;
}

.timer-display {
    container-type: size;

    display: grid;
    grid-template-columns: 100cqw;
    grid-template-rows: 
        10%     
        10%     
        10%     
        60%
        10%;   
    
    text-align: center;
    padding: 0cqh;
        gap: 0cqh;
        margin: 0cqh;

    border-radius: 2cqh;
}

.timer-display.active {
    --current-phase-color: var(--phase-active-color);
}

.timer-display.rest {
    --current-phase-color: var(--phase-prepare-color);
}

.current-set-of-sets,
.current-exercise-name, 
.current-exercise-phase {
    font-size: 7cqh;
    font-weight: 600;
    color: var(--color-text);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    line-height: 1;
}

.countdown-display {
    container-type: size;
    position: relative;
    height: 100%;
    aspect-ratio: 1 / 1;
    align-self: center;
    justify-self: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.countdown-pie-chart {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    height: 90cqh;
    width: 90cqh;
    border-radius: 50%;
    z-index: 0;
    background: conic-gradient(
        var(--current-phase-color) 0% var(--pie-progress, 0%),
        transparent var(--pie-progress, 0%) 100%
    );
}

.countdown-number {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 60cqh;
    padding-bottom: 4cqh; /* 5% of font-size (workaround team font metrics mistakes). */
    font-weight: 700;
    color: var(--color-text);
    line-height: 1;
    z-index: 1;
}

.progress-container {
    position: relative;

    width: 100%;
    height: 100%;
}

.progress-bar {
    width: 100%;
    height: 100%;
    background: var(--progress-bg);
    border-radius: 10cqh;
    overflow: hidden;
    border: 0.5cqh solid var(--ocean-accent);
}

.progress-fill {
    height: 100%;
    background: var(--progress-fill);
    transition: width 0.5s ease;
    border-radius: 1.5dvh;
    box-shadow: 0 0 1cqh rgba(0, 188, 212, 0.5);
}

.progress-percentage {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    text-align: center;
    font-size: 3dvh;
    font-weight: 600;
    color: var(--color-text);
    text-shadow: var(--color-text-glow);
    pointer-events: none;
}
