/*
Script: Enhanced Timer Persistence Styles
FileName: timer_persistence_enhanced_styles.css
Philippe Addelia
Created: September 05, 2025 PST
Modified: September 05, 2025 PST
Preferred location: css/timer_persistence_enhanced_styles.css
Purpose: Styles for enhanced timer persistence resume dialog functionality
Version: 1.1.10.1
*/

/* ============================================================================
   TIMER RESUME MODAL STYLES
   ============================================================================ */

#timerResumeModal {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Animation keyframes for modal appearance */
@keyframes timerModalFadeIn {
    from { 
        opacity: 0; 
        transform: translate(-50%, -50%) scale(0.9);
    }
    to { 
        opacity: 1; 
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes timerModalSlideIn {
    from { 
        opacity: 0; 
        transform: translate(-50%, -60%);
    }
    to { 
        opacity: 1; 
        transform: translate(-50%, -50%);
    }
}

/* Timer resume modal container */
.timer-resume-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(3px);
    animation: timerModalFadeIn 0.3s ease-out;
}

/* Timer resume modal content */
.timer-resume-modal-content {
    background: #ffffff;
    padding: 35px;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 520px;
    width: 92%;
    text-align: center;
    position: relative;
    animation: timerModalSlideIn 0.4s ease-out;
    border: 1px solid rgba(0, 123, 255, 0.1);
}

/* Timer resume modal header */
.timer-resume-modal h2 {
    color: #007bff;
    margin: 0 0 20px 0;
    font-size: 24px;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Timer resume modal text */
.timer-resume-modal p {
    font-size: 16px;
    line-height: 1.6;
    margin: 15px 0 25px 0;
    color: #495057;
}

.timer-resume-modal .timer-details {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    border-left: 4px solid #007bff;
}

.timer-resume-modal .timer-details strong {
    color: #007bff;
}

/* Button container */
.timer-resume-modal .button-container {
    margin: 25px 0 15px 0;
}

/* Resume timer button */
.timer-resume-btn {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border: none;
    padding: 14px 28px;
    margin: 8px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
    min-width: 160px;
}

.timer-resume-btn:hover {
    background: linear-gradient(135deg, #218838, #1ea085);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

.timer-resume-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

/* Discard timer button */
.timer-discard-btn {
    background: linear-gradient(135deg, #dc3545, #e74c3c);
    color: white;
    border: none;
    padding: 14px 28px;
    margin: 8px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
    min-width: 160px;
}

.timer-discard-btn:hover {
    background: linear-gradient(135deg, #c82333, #dc2626);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.4);
}

.timer-discard-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
}

/* Cancel button */
.timer-cancel-btn {
    background: linear-gradient(135deg, #6c757d, #5a6268);
    color: white;
    border: none;
    padding: 10px 20px;
    margin: 8px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(108, 117, 125, 0.2);
}

.timer-cancel-btn:hover {
    background: linear-gradient(135deg, #5a6268, #495057);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

/* Button icons */
.timer-resume-btn::before {
    content: "▶️ ";
    margin-right: 8px;
}

.timer-discard-btn::before {
    content: "🗑️ ";
    margin-right: 8px;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .timer-resume-modal-content {
        padding: 25px 20px;
        margin: 20px;
        width: calc(100% - 40px);
    }
    
    .timer-resume-modal h2 {
        font-size: 20px;
    }
    
    .timer-resume-modal p {
        font-size: 15px;
    }
    
    .timer-resume-btn,
    .timer-discard-btn {
        display: block;
        width: 100%;
        margin: 8px 0;
        padding: 16px 20px;
        font-size: 16px;
    }
    
    .timer-cancel-btn {
        display: block;
        width: 100%;
        margin: 8px 0;
        padding: 12px 20px;
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    .timer-resume-modal-content {
        padding: 20px 15px;
        margin: 15px;
        border-radius: 12px;
    }
    
    .timer-resume-modal h2 {
        font-size: 18px;
        margin-bottom: 15px;
    }
    
    .timer-resume-modal p {
        font-size: 14px;
        line-height: 1.5;
    }
}

/* ============================================================================
   TIMER RUNNING INDICATOR ENHANCEMENTS
   ============================================================================ */

/* Enhanced timer display for when timer is running */
.timer-running-enhanced {
    animation: timerPulse 2s ease-in-out infinite;
    border: 2px solid #28a745;
    border-radius: 8px;
    padding: 5px 10px;
    background: rgba(40, 167, 69, 0.1);
}

@keyframes timerPulse {
    0%, 100% { 
        box-shadow: 0 0 5px rgba(40, 167, 69, 0.3);
    }
    50% { 
        box-shadow: 0 0 15px rgba(40, 167, 69, 0.6);
    }
}

/* Timer persistence indicator */
.timer-persistence-indicator {
    position: relative;
}

.timer-persistence-indicator::after {
    content: "💾";
    position: absolute;
    top: -5px;
    right: -5px;
    font-size: 12px;
    opacity: 0.7;
}

/* ============================================================================
   ACCESSIBILITY ENHANCEMENTS
   ============================================================================ */

/* Focus styles for accessibility */
.timer-resume-btn:focus,
.timer-discard-btn:focus,
.timer-cancel-btn:focus {
    outline: 3px solid rgba(0, 123, 255, 0.5);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .timer-resume-modal-content {
        border: 2px solid #000;
    }
    
    .timer-resume-btn,
    .timer-discard-btn,
    .timer-cancel-btn {
        border: 1px solid #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .timer-resume-modal,
    .timer-resume-modal-content,
    .timer-resume-btn,
    .timer-discard-btn,
    .timer-cancel-btn {
        animation: none;
        transition: none;
    }
    
    .timer-running-enhanced {
        animation: none;
    }
}

/* ============================================================================
   DARK MODE SUPPORT
   ============================================================================ */

@media (prefers-color-scheme: dark) {
    .timer-resume-modal-content {
        background: #2d3748;
        color: #e2e8f0;
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .timer-resume-modal h2 {
        color: #63b3ed;
    }
    
    .timer-resume-modal p {
        color: #cbd5e0;
    }
    
    .timer-resume-modal .timer-details {
        background: #4a5568;
        border-left-color: #63b3ed;
    }
}

/* ============================================================================
   LOADING AND TRANSITION STATES
   ============================================================================ */

/* Loading state for buttons */
.timer-btn-loading {
    position: relative;
    color: transparent !important;
}

.timer-btn-loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Success state animation */
.timer-btn-success {
    background: #28a745 !important;
    animation: successPulse 0.6s ease-out;
}

@keyframes successPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* ============================================================================
   PRINT STYLES
   ============================================================================ */

@media print {
    .timer-resume-modal {
        display: none !important;
    }
}

/* ============================================================================
   NOTIFICATION ENHANCEMENTS
   ============================================================================ */

/* Enhanced notification for timer persistence */
.timer-persistence-notification {
    border-left: 4px solid #007bff;
    background: rgba(0, 123, 255, 0.1);
    padding: 12px 16px;
    margin: 10px 0;
    border-radius: 4px;
}

.timer-persistence-notification.success {
    border-left-color: #28a745;
    background: rgba(40, 167, 69, 0.1);
}

.timer-persistence-notification.warning {
    border-left-color: #ffc107;
    background: rgba(255, 193, 7, 0.1);
}

.timer-persistence-notification.error {
    border-left-color: #dc3545;
    background: rgba(220, 53, 69, 0.1);
}