/**
 * CSRF Status Message Styling
 * 
 * Provides consistent styling for CSRF auto-refresh status messages
 * that appear in the top-right corner of the page.
 */

/* Base status message styling */
#csrf-status-message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    z-index: 10000;
    max-width: 320px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
    transform: translateX(0);
    opacity: 1;
    line-height: 1.4;
    word-wrap: break-word;
}

/* Status message variants */
#csrf-status-message.csrf-status-info {
    background: #e3f2fd;
    color: #1976d2;
    border-left: 4px solid #2196f3;
}

#csrf-status-message.csrf-status-success {
    background: #e8f5e8;
    color: #2e7d32;
    border-left: 4px solid #4caf50;
}

#csrf-status-message.csrf-status-warning {
    background: #fff3e0;
    color: #f57c00;
    border-left: 4px solid #ff9800;
}

#csrf-status-message.csrf-status-error {
    background: #ffebee;
    color: #d32f2f;
    border-left: 4px solid #f44336;
}

/* Animation states */
#csrf-status-message.csrf-entering {
    opacity: 0;
    transform: translateX(100%);
}

#csrf-status-message.csrf-leaving {
    opacity: 0;
    transform: translateX(100%);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #csrf-status-message {
        left: 20px;
        right: 20px;
        max-width: none;
        font-size: 13px;
        padding: 10px 14px;
    }
}

@media (max-width: 480px) {
    #csrf-status-message {
        top: 10px;
        left: 10px;
        right: 10px;
        font-size: 12px;
        padding: 8px 12px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    #csrf-status-message.csrf-status-info {
        background: #1e3a8a;
        color: #bfdbfe;
        border-left-color: #3b82f6;
    }

    #csrf-status-message.csrf-status-success {
        background: #166534;
        color: #bbf7d0;
        border-left-color: #22c55e;
    }

    #csrf-status-message.csrf-status-warning {
        background: #92400e;
        color: #fde68a;
        border-left-color: #f59e0b;
    }

    #csrf-status-message.csrf-status-error {
        background: #991b1b;
        color: #fecaca;
        border-left-color: #ef4444;
    }

    #csrf-status-message {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    #csrf-status-message {
        border: 2px solid currentColor;
        font-weight: 600;
    }

    #csrf-status-message.csrf-status-info {
        background: #000;
        color: #00f;
        border-color: #00f;
    }

    #csrf-status-message.csrf-status-success {
        background: #000;
        color: #0f0;
        border-color: #0f0;
    }

    #csrf-status-message.csrf-status-warning {
        background: #000;
        color: #ff0;
        border-color: #ff0;
    }

    #csrf-status-message.csrf-status-error {
        background: #000;
        color: #f00;
        border-color: #f00;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    #csrf-status-message {
        transition: opacity 0.1s ease;
        transform: none;
    }

    #csrf-status-message.csrf-entering,
    #csrf-status-message.csrf-leaving {
        transform: none;
    }
}