/* =============================================================================
   SESSION TOAST COMPONENT - Reusable across all pages
   ============================================================================= */

.session-expiry-toast {
    position: fixed;
    top: 80px; /* Moved down to avoid header overlap */
    right: 20px;
    background: var(--charcoal, #2C2C2C); /* Fallback if CSS variable not available */
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    display: none; /* Hidden by default, shown by JS */
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 0.3s ease-out, transform 0.3s ease-out;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    max-width: 320px; /* Increased for longer text */
    cursor: pointer;
    line-height: 1.4;
}

/* When JavaScript sets display: flex, make it visible with smooth animation */
.session-expiry-toast[style*="display: flex"] {
    opacity: 1;
    transform: translateY(0);
}

/* Hover effect for better UX */
.session-expiry-toast:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* Style the countdown number */
.session-expiry-toast #countdown {
    font-weight: 700;
    color: #FFB366; /* Orange accent color */
    font-size: 1rem;
}

/* Add subtle animation to countdown */
.session-expiry-toast #countdown {
    animation: pulse 2s infinite;
}

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

/* Icon before text */
.session-expiry-toast::before {
    content: '⏰';
    margin-right: 0.5rem;
    font-size: 1rem;
}

/* Responsive positioning */
@media (max-width: 768px) {
    .session-expiry-toast {
        top: 60px;
        right: 15px;
        left: 15px;
        max-width: none;
        font-size: 0.85rem;
        padding: 0.875rem 1.25rem;
        text-align: center;
    }
}

/* Ensure it works with different header heights */
@media (max-width: 600px) {
    .session-expiry-toast {
        top: 70px; /* Adjust for mobile header */
    }
}

/* Alternative styling for urgent countdown (under 60 seconds) */
.session-expiry-toast.urgent {
    background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
    animation: shake 0.5s infinite;
}

.session-expiry-toast.urgent #countdown {
    color: #fef2f2;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-2px); }
    75% { transform: translateX(2px); }
}