/* css/timer.css */
@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@400;500;700&display=swap');

.timer-card {
    background: #0A0A0A !important;
    border: none;
    border-radius: 28px;
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

/* Force Oswald font for all elements inside the timer card */
.timer-card,
.timer-card h3,
.timer-card span:not(.material-symbols-outlined),
.timer-card div,
.timer-card button,
.timer-card input {
    font-family: 'Oswald', sans-serif !important;
    letter-spacing: 0.02em;
}

/* Custom styling for the range slider track and thumb */
#timer-custom-slider {
    -webkit-appearance: none;
    appearance: none;
    background: transparent !important;
    height: 24px;
    width: 100%;
}

#timer-custom-slider::-webkit-slider-runnable-track {
    background: #222222;
    height: 6px;
    border-radius: 99px;
}

#timer-custom-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 10px;
    height: 20px;
    border-radius: 2px;
    background: #BFFF00;
    cursor: pointer;
    margin-top: -7px;
    transition: transform 0.15s ease;
}

#timer-custom-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

/* Firefox Support */
#timer-custom-slider::-moz-range-track {
    background: #222222;
    height: 6px;
    border-radius: 99px;
}

#timer-custom-slider::-moz-range-thumb {
    width: 10px;
    height: 20px;
    border-radius: 2px;
    background: #BFFF00;
    border: none;
    cursor: pointer;
    transition: transform 0.15s ease;
}

#timer-custom-slider::-moz-range-thumb:hover {
    transform: scale(1.2);
}

/* Presets button styles */
.preset-btn {
    background: transparent !important;
    border: 2px solid #FFFFFF !important;
    color: #FFFFFF !important;
    border-radius: 8px;
    padding: 10px 0px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
}

.preset-btn:active {
    transform: scale(0.95);
}

.preset-btn:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: #ffffff !important;
}

.preset-btn.active-preset {
    background: #BFFF00 !important;
    border-color: #BFFF00 !important;
    color: #000000 !important;
    outline: 2px solid #BFFF00 !important;
    outline-offset: 2px;
}

.preset-btn.active-preset:hover {
    background: #cbfb26 !important;
    border-color: #cbfb26 !important;
    outline-color: #cbfb26 !important;
}

/* Adjust minute buttons */
.adjust-btn {
    background: transparent !important;
    border: 2px solid #FFFFFF !important;
    color: #FFFFFF !important;
    border-radius: 8px;
    padding: 10px 0px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.adjust-btn:hover {
    background: rgba(255, 255, 255, 0.08) !important;
}

/* Bottom Row Control Buttons */
.control-btn-sec {
    width: 48px;
    height: 48px;
    border-radius: 50% !important;
    border: 2px solid #FFFFFF !important;
    background: transparent !important;
    color: #FFFFFF !important;
    transition: all 0.2s ease;
}

.control-btn-sec:hover {
    background: rgba(255, 255, 255, 0.08) !important;
}

/* Play button wrapper and layers */
.play-btn-wrapper {
    position: relative;
    width: 64px;
    height: 64px;
}

.control-btn-pri {
    position: absolute !important;
    top: 0;
    left: 0;
    width: 64px;
    height: 64px;
    background-color: #BFFF00 !important;
    color: #000000 !important;
    border-radius: 12px !important;
    z-index: 2;
    transition: transform 0.1s ease, background-color 0.3s ease;
}

.control-btn-pri:hover {
    background-color: #cbfb26 !important;
}

.control-btn-pri:active {
    transform: translate(2px, 2px);
}

.play-btn-shadow {
    position: absolute;
    top: 4px;
    left: 4px;
    width: 64px;
    height: 64px;
    background-color: #00E5FF;
    border-radius: 12px;
    z-index: 1;
    transition: background-color 0.3s ease;
}

/* When running, shadow becomes lime green */
.timer-running .play-btn-shadow {
    background-color: #BFFF00 !important;
}

/* SVG ring progress animation setup */
.timer-track {
    fill: none;
    stroke: rgba(255, 255, 255, 0.015);
    stroke-width: 16px;
}

.timer-progress {
    fill: none;
    stroke: url(#timer-grad);
    stroke-width: 16px;
    stroke-linecap: round;
    stroke-dasharray: 502.65; /* 2 * PI * r (r=80) = 502.65 */
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 0.1s linear;
}

/* Pulse animation for running state */
@keyframes timerPulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.02); opacity: 0.97; }
    100% { transform: scale(1); opacity: 1; }
}

.timer-running-pulse {
    animation: timerPulse 2s infinite ease-in-out;
}

/* Expressive transition configurations for timer running state */
.timer-section-toggle {
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                margin 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                padding 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                visibility 0.4s;
    max-height: 150px;
    opacity: 1;
    visibility: visible;
    overflow: hidden;
}

.timer-running .timer-section-toggle {
    max-height: 0;
    opacity: 0;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    visibility: hidden;
    pointer-events: none;
}

#timer-reset, #timer-sound-toggle {
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                width 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                margin 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                border-width 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                visibility 0.4s;
}

.timer-running #timer-reset,
.timer-running #timer-sound-toggle {
    opacity: 0;
    width: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding: 0 !important;
    border-width: 0 !important;
    visibility: hidden;
    pointer-events: none;
    overflow: hidden;
}

.timer-controls-row {
    transition: gap 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.timer-running .timer-controls-row {
    gap: 0 !important;
}
