/* Session Handler Styles */

.session-expired-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.session-expired-content {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
    max-width: 400px;
    width: 90%;
}

.session-expired-icon {
    font-size: 3rem;
    color: #dc3545;
    margin-bottom: 1rem;
}

.session-expired-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 1rem;
}

.session-expired-message {
    color: #666;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.session-expired-button {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
}

.session-expired-button:hover {
    background-color: #0056b3;
}

/* RTL Support */
[dir="rtl"] .session-expired-content {
    text-align: center;
}

[dir="rtl"] .session-expired-button {
    direction: rtl;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .session-expired-content {
        background: #2d3748;
        color: #e2e8f0;
    }
    
    .session-expired-title {
        color: #e2e8f0;
    }
    
    .session-expired-message {
        color: #a0aec0;
    }
}

/* Animation */
.session-expired-modal {
    animation: fadeIn 0.3s ease-in-out;
}

.session-expired-content {
    animation: slideIn 0.3s ease-in-out;
}

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

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

/* Loading spinner for CSRF refresh */
.csrf-refresh-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

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

/* Toast notification styles for session expiry */
.session-expired-toast {
    background-color: #dc3545;
    color: white;
    padding: 1rem;
    border-radius: 4px;
    margin: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    animation: slideInRight 0.3s ease-in-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}
