/* Idle Timeout Styles for Trail Intel */

.idle-warning-overlay,
.logout-message-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease-in;
}

.idle-warning-content,
.logout-message-content {
    background: white;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    max-width: 450px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease-out;
}

.idle-warning-content h3,
.logout-message-content h3 {
    margin-bottom: 20px;
    color: #dc3545;
    font-size: 24px;
    font-weight: 600;
}

.idle-warning-content p,
.logout-message-content p {
    margin-bottom: 15px;
    font-size: 16px;
    color: #495057;
    line-height: 1.5;
}

.idle-warning-buttons {
    margin-top: 25px;
    display: flex;
    gap: 15px;
    justify-content: center;
}

.idle-warning-buttons .btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 120px;
}

.btn-success {
    background-color: #28a745;
    color: white;
}

.btn-success:hover {
    background-color: #218838;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

#countdown {
    color: #dc3545;
    font-weight: bold;
    font-size: 18px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.logout-spinner {
    margin-top: 20px;
}

.spinner-border {
    width: 2rem;
    height: 2rem;
    border: 0.25em solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spinner-border 0.75s linear infinite;
}

.text-primary {
    color: #007bff !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { 
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to { 
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes spinner-border {
    to {
        transform: rotate(360deg);
    }
}

/* Pulse effect for countdown */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

#countdown {
    animation: pulse 1s ease-in-out infinite;
}

/* Mobile responsiveness */
@media (max-width: 576px) {
    .idle-warning-content,
    .logout-message-content {
        margin: 20px;
        padding: 20px;
        max-width: none;
    }
    
    .idle-warning-content h3,
    .logout-message-content h3 {
        font-size: 20px;
    }
    
    .idle-warning-content p,
    .logout-message-content p {
        font-size: 14px;
    }
    
    .idle-warning-buttons {
        flex-direction: column;
    }
    
    .idle-warning-buttons .btn {
        margin-bottom: 10px;
        width: 100%;
    }
    
    #countdown {
        font-size: 16px;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .idle-warning-overlay,
    .logout-message-overlay {
        background: rgba(0, 0, 0, 0.9);
    }
    
    .idle-warning-content,
    .logout-message-content {
        border: 2px solid #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .idle-warning-overlay,
    .logout-message-overlay,
    .idle-warning-content,
    .logout-message-content,
    .idle-warning-buttons .btn,
    #countdown {
        animation: none;
        transition: none;
    }
    
    .idle-warning-buttons .btn:hover {
        transform: none;
    }
}
