/**
 * Interview Timer Styles
 * 
 * Styles for the interview practice timer component
 */

.interview-timer-wrapper {
    max-width: 400px;
    margin: 0 auto;
    padding: 30px;
    text-align: center;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Timer Display Container */
.timer-display-container {
    position: relative;
    margin-bottom: 30px;
}

/* Timer Ring */
.timer-ring {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto;
}

.timer-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.timer-ring-bg {
    fill: none;
    stroke: #f0f0f0;
    stroke-width: 8;
}

.timer-ring-progress {
    fill: none;
    stroke: #0073aa;
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.1s linear;
}

/* Timer states */
.timer-warning .timer-ring-progress {
    stroke: #ff9800;
}

.timer-critical .timer-ring-progress {
    stroke: #f44336;
    animation: pulse-ring 1s ease-in-out infinite;
}

.timer-complete .timer-ring-progress {
    stroke: #4caf50;
}

@keyframes pulse-ring {
    0% {
        stroke-width: 8;
        opacity: 1;
    }
    50% {
        stroke-width: 12;
        opacity: 0.8;
    }
    100% {
        stroke-width: 8;
        opacity: 1;
    }
}

/* Timer Display */
.timer-display {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Roboto Mono', 'Courier New', monospace;
    font-size: 36px;
    font-weight: 300;
    color: #333;
    letter-spacing: 2px;
}

.timer-separator {
    animation: blink 1s ease-in-out infinite;
}

.timer-running .timer-separator {
    animation: none;
}

@keyframes blink {
    0%, 50% {
        opacity: 1;
    }
    51%, 100% {
        opacity: 0;
    }
}

.timer-milliseconds {
    font-size: 24px;
    color: #666;
}

/* Timer Label */
.timer-label {
    margin-top: 20px;
    font-size: 18px;
    font-weight: 500;
    color: #555;
}

/* Timer Controls */
.timer-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.timer-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.timer-btn:hover {
    background: #005a87;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 115, 170, 0.3);
}

.timer-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(0, 115, 170, 0.3);
}

.timer-btn:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

.timer-btn.timer-pause {
    background: #ff9800;
}

.timer-btn.timer-pause:hover {
    background: #e68900;
}

.timer-btn.timer-reset {
    background: #6c757d;
}

.timer-btn.timer-reset:hover {
    background: #5a6268;
}

.timer-btn.timer-extend {
    background: #28a745;
}

.timer-btn.timer-extend:hover {
    background: #218838;
}

.timer-btn .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.timer-btn .btn-text {
    display: inline-block;
}

/* Timer Message */
.timer-message {
    min-height: 30px;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    display: none;
}

.timer-message.message-info {
    background: #e3f2fd;
    color: #1976d2;
}

.timer-message.message-warning {
    background: #fff3e0;
    color: #f57c00;
}

.timer-message.message-critical {
    background: #ffebee;
    color: #c62828;
    animation: pulse-message 0.5s ease-in-out;
}

.timer-message.message-success {
    background: #e8f5e9;
    color: #2e7d32;
}

.timer-message.message-complete {
    background: #f3e5f5;
    color: #6a1b9a;
    font-size: 18px;
    font-weight: 600;
}

.timer-message.message-error {
    background: #ffebee;
    color: #c62828;
}

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

/* Intervals Mode */
.timer-intervals {
    margin-top: 30px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

.timer-intervals h4 {
    margin: 0 0 15px 0;
    font-size: 16px;
    color: #333;
}

.intervals-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.interval-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    transition: all 0.2s;
}

.interval-item.active {
    background: #e3f2fd;
    border-color: #0073aa;
    box-shadow: 0 2px 4px rgba(0, 115, 170, 0.1);
}

.interval-item.completed {
    opacity: 0.6;
    background: #f5f5f5;
}

.interval-item.completed::before {
    content: '✓';
    color: #4caf50;
    margin-right: 8px;
    font-weight: bold;
}

.interval-name {
    font-weight: 500;
    color: #333;
}

.interval-duration {
    font-size: 13px;
    color: #666;
}

/* Timer States */
.timer-running .timer-display {
    color: #0073aa;
}

.timer-paused .timer-display {
    color: #ff9800;
}

.timer-paused .timer-separator {
    animation: blink 0.5s ease-in-out infinite;
}

.timer-warning .timer-display {
    color: #ff9800;
}

.timer-critical .timer-display {
    color: #f44336;
    animation: pulse-text 0.5s ease-in-out infinite;
}

@keyframes pulse-text {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.05);
    }
}

.timer-complete .timer-display {
    color: #4caf50;
}

/* Loading State */
.interview-timer-wrapper.loading {
    opacity: 0.5;
    pointer-events: none;
}

/* Responsive Design */
@media (max-width: 480px) {
    .interview-timer-wrapper {
        padding: 20px;
    }
    
    .timer-ring {
        width: 160px;
        height: 160px;
    }
    
    .timer-display {
        font-size: 28px;
    }
    
    .timer-milliseconds {
        font-size: 20px;
    }
    
    .timer-btn {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    .timer-btn .btn-text {
        display: none;
    }
    
    .timer-controls {
        gap: 8px;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .timer-ring-bg {
        stroke-width: 10;
    }
    
    .timer-ring-progress {
        stroke-width: 10;
    }
    
    .timer-btn {
        border: 2px solid currentColor;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .timer-separator,
    .timer-critical .timer-display,
    .timer-critical .timer-ring-progress,
    .timer-message.message-critical {
        animation: none;
    }
    
    .timer-btn,
    .interval-item {
        transition: none;
    }
}

/* Print Styles */
@media print {
    .interview-timer-wrapper {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .timer-controls {
        display: none;
    }
    
    .timer-message {
        display: block !important;
        background: none !important;
        color: #333 !important;
    }
}