/*
 * ====================================================
 * CLOCK & TIMERS
 * ====================================================
 */


/*
 * ----------------------------------------------------
 * TIMER PANELS
 * ----------------------------------------------------
 */

.timer-panel {
    width: 100%;
}


/*
 * ----------------------------------------------------
 * DIGITAL CLOCK
 * ----------------------------------------------------
 */

#digital-time {
    font-variant-numeric: tabular-nums;
}


/*
 * ----------------------------------------------------
 * TIMER DISPLAYS
 * ----------------------------------------------------
 */

#stopwatch-display,
#countdown-display,
#interval-display,
#pomodoro-display,
#hiit-display,
#study-display,
#countdown-date-display,
#chess-player1-display,
#chess-player2-display,
#tabata-display,
#custom-interval-display,
#presentation-display,
#metronome-bpm-display,
#reaction-message {
    font-variant-numeric: tabular-nums;
}


/*
 * ----------------------------------------------------
 * PROGRESS BARS
 * ----------------------------------------------------
 */

.timer-panel .progress {
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}


/*
 * ----------------------------------------------------
 * ANALOG CLOCK
 * ----------------------------------------------------
 */

.analog-clock {
    position: relative;
    width: min(80vw, 400px);
    height: min(80vw, 400px);
    margin: 0 auto;
    border: 8px solid var(--bs-body-color);
    border-radius: 50%;
    background: var(--bs-body-bg);
}


/*
 * Analog clock centre.
 */

.analog-clock .clock-center {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: var(--bs-body-color);
    z-index: 10;
}


/*
 * Analog clock hands.
 */

.analog-clock .clock-hand {
    position: absolute;
    left: 50%;
    bottom: 50%;
    transform-origin: 50% 100%;
    border-radius: 5px;
}


.analog-clock .hour-hand {
    width: 8px;
    height: 25%;
    margin-left: -4px;
    background: var(--bs-body-color);
}


.analog-clock .minute-hand {
    width: 6px;
    height: 35%;
    margin-left: -3px;
    background: var(--bs-body-color);
}


.analog-clock .second-hand {
    width: 2px;
    height: 40%;
    margin-left: -1px;
    background: var(--bs-danger);
}


/*
 * ----------------------------------------------------
 * WORLD CLOCK
 * ----------------------------------------------------
 */

.world-clock-card {
    font-variant-numeric: tabular-nums;
}


/*
 * ----------------------------------------------------
 * CHESS CLOCK
 * ----------------------------------------------------
 */

.chess-clock-display {
    font-variant-numeric: tabular-nums;
}


.chess-clock-low-time {
    animation: chessClockWarning 1s infinite;
}


@keyframes chessClockWarning {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }

}


/*
 * ----------------------------------------------------
 * REACTION TIMER
 * ----------------------------------------------------
 */

#reaction-area {
    transition:
        background-color 0.15s ease,
        transform 0.1s ease;
}


#reaction-area:active {
    transform: scale(0.99);
}


/*
 * ----------------------------------------------------
 * FULLSCREEN
 * ----------------------------------------------------
 */

.timer-panel:fullscreen {
    background: var(--bs-body-bg);
    width: 100%;
    height: 100%;
    overflow: auto;
    padding: 40px;
}


.timer-panel:fullscreen .card {
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    justify-content: center;
}


.timer-panel:fullscreen .display-1 {
    font-size: clamp(5rem, 15vw, 14rem);
}


.timer-panel:fullscreen .display-2 {
    font-size: clamp(4rem, 12vw, 10rem);
}


.timer-panel:fullscreen .display-3 {
    font-size: clamp(3rem, 9vw, 8rem);
}


.timer-panel:fullscreen .fs-2 {
    font-size: clamp(2rem, 5vw, 4rem) !important;
}


/*
 * ----------------------------------------------------
 * MOBILE FULLSCREEN
 * ----------------------------------------------------
 */

@media (max-width: 576px) {

    .timer-panel:fullscreen {
        padding: 20px;
    }


    .timer-panel:fullscreen .card {
        min-height: calc(100vh - 40px);
    }

}