/* Alarm-specific styles extending the main styles.css */

.alarm-container {
    background: #1c1c1e;
    border-radius: 20px;
    padding: 40px 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    min-height: 600px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.setup-mode, .active-mode {
    opacity: 1;
    transition: opacity 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
}

.hidden {
    display: none !important;
}

/* Ensure active mode is hidden when not in use */
.active-mode.hidden {
    display: none;
}

/* Time Pickers */
.time-pickers {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 40px;
    padding: 20px 0;
}

.time-picker {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    position: relative;
}

.picker-label {
    font-size: 14px;
    color: #8e8e93;
    font-weight: 500;
    text-transform: lowercase;
}

.picker-scroller {
    width: 80px;
    height: 200px;
    overflow-y: auto;
    overflow-x: hidden;
    scroll-snap-type: y mandatory;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
    background: linear-gradient(
        to bottom,
        rgba(28, 28, 30, 1) 0%,
        rgba(28, 28, 30, 0.8) 20%,
        rgba(28, 28, 30, 0) 40%,
        rgba(28, 28, 30, 0) 60%,
        rgba(28, 28, 30, 0.8) 80%,
        rgba(28, 28, 30, 1) 100%
    );
    border-radius: 8px;
}

/* Hide scrollbar for Chrome, Safari and Opera */
.picker-scroller::-webkit-scrollbar {
    display: none;
}

.picker-options {
    display: flex;
    flex-direction: column;
    padding: 80px 0; /* Add padding to center first and last items */
}

.picker-option {
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 300;
    color: #8e8e93;
    transition: color 0.2s ease;
    user-select: none;
    scroll-snap-align: center;
    scroll-snap-stop: always;
    flex-shrink: 0;
}

.picker-option.selected {
    color: #fff;
    font-weight: 400;
}

.picker-indicator {
    position: absolute;
    top: 56%;
    left: 0;
    right: 0;
    height: 40px;
    transform: translateY(-50%);
    border-top: 2px solid #48484a;
    border-bottom: 2px solid #48484a;
    pointer-events: none;
    z-index: 10;
}

/* Active Mode Display - inherits flex properties from setup-mode, active-mode selector above */

.current-time {
    text-align: center;
    margin-bottom: 60px;
}

.time-display {
    font-size: 6rem;
    font-weight: 200;
    font-variant-numeric: tabular-nums;
    letter-spacing: -3px;
    color: #fff;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.1);
    margin-bottom: 20px;
    line-height: 1;
}

/* Ringing state for time display */
.time-display.alarm-ringing {
    color: #ff453a;
    animation: pulse 1s infinite;
}

.date-display {
    font-size: 1.25rem;
    font-weight: 400;
    color: #8e8e93;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
}

.alarm-display {
    font-size: 1rem;
    font-weight: 400;
    color: #ff9f0a;
    letter-spacing: 0.5px;
}

.alarm-message {
    font-size: 2rem;
    font-weight: 600;
    color: #ff453a;
    text-align: center;
    margin-top: 20px;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

/* Alarm Controls */
.alarm-container .controls {
    justify-content: flex-end;
}

/* When snooze button is visible, use space-between for left/right alignment */
.alarm-container .controls:has(#snoozeButton:not(.hidden)) {
    justify-content: space-between;
}

/* Cancel button styling - red border only */
.alarm-container #cancelButton {
    background: transparent;
    border-color: #ff453a;
    color: #ff453a;
}

.alarm-container #cancelButton:hover {
    border-color: #ff3b30;
    color: #ff3b30;
}

/* Stop button styling - red background */
.alarm-container #stopButton {
    background: #ff453a;
    border-color: #ff453a;
    color: #fff;
}

.alarm-container #stopButton:hover {
    background: #ff3b30;
    border-color: #ff3b30;
}

/* Button states for alarm */
.alarm-container .start-stop-btn:disabled {
    border-color: #48484a;
    color: #48484a;
    cursor: not-allowed;
}

.alarm-container .lap-btn:disabled {
    border-color: #48484a;
    color: #48484a;
    cursor: not-allowed;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .time-display {
        font-size: 4.5rem;
        letter-spacing: -2px;
    }
    
    .date-display {
        font-size: 1rem;
    }
    
    .alarm-message {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .time-pickers {
        gap: 15px;
        padding: 30px 0;
    }
    
    .picker-scroller {
        width: 70px;
        height: 180px;
    }
    
    .picker-option {
        height: 36px;
        font-size: 20px;
    }
    
    .time-display {
        font-size: 3.5rem;
        letter-spacing: -1px;
    }
    
    .date-display {
        font-size: 0.9rem;
    }
    
    .alarm-message {
        font-size: 1.25rem;
    }
    
    .alarm-container {
        min-height: 540px;
    }
}
