/* Notification styles for error handler */
.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    max-width: 400px;
    pointer-events: none;
}

.notification {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin-bottom: 12px;
    padding: 16px;
    border-left: 4px solid #3b82f6;
    transform: translateX(100%);
    transition: all 0.3s ease-in-out;
    pointer-events: auto;
    position: relative;
    max-width: 100%;
    word-wrap: break-word;
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    border-left-color: #10b981;
    background-color: #f0fdf4;
}

.notification.error {
    border-left-color: #ef4444;
    background-color: #fef2f2;
}

.notification.warning {
    border-left-color: #f59e0b;
    background-color: #fffbeb;
}

.notification.info {
    border-left-color: #3b82f6;
    background-color: #eff6ff;
}

.notification-content {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.notification-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin-top: 2px;
}

.notification-icon.success {
    color: #10b981;
}

.notification-icon.error {
    color: #ef4444;
}

.notification-icon.warning {
    color: #f59e0b;
}

.notification-icon.info {
    color: #3b82f6;
}

.notification-message {
    flex: 1;
    font-size: 14px;
    line-height: 1.5;
    color: #374151;
}

.notification.success .notification-message {
    color: #065f46;
}

.notification.error .notification-message {
    color: #991b1b;
}

.notification.warning .notification-message {
    color: #92400e;
}

.notification.info .notification-message {
    color: #1e40af;
}

.notification-close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #6b7280;
    padding: 4px;
    line-height: 1;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.notification-close:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

/* Field error styles */
.field-error {
    color: #ef4444;
    font-size: 12px;
    margin-top: 4px;
    display: block;
}

.field-error-border {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 1px #ef4444 !important;
}

/* Loading state styles */
.loading-disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 8px;
}

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

/* Mobile responsive adjustments */
@media (max-width: 640px) {
    .notification-container {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .notification {
        margin-bottom: 8px;
        padding: 12px;
    }
    
    .notification-message {
        font-size: 13px;
    }
}

/* Dark theme support */
@media (prefers-color-scheme: dark) {
    .notification {
        background: #1f2937;
        color: #f9fafb;
    }
    
    .notification.success {
        background-color: #064e3b;
    }
    
    .notification.error {
        background-color: #7f1d1d;
    }
    
    .notification.warning {
        background-color: #78350f;
    }
    
    .notification.info {
        background-color: #1e3a8a;
    }
    
    .notification-message {
        color: #f9fafb;
    }
    
    .notification-close {
        color: #d1d5db;
    }
    
    .notification-close:hover {
        background-color: rgba(255, 255, 255, 0.1);
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .notification {
        border-width: 2px;
        border-style: solid;
    }
    
    .notification.success {
        border-color: #10b981;
    }
    
    .notification.error {
        border-color: #ef4444;
    }
    
    .notification.warning {
        border-color: #f59e0b;
    }
    
    .notification.info {
        border-color: #3b82f6;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .notification {
        transition: none;
    }
    
    .loading-spinner {
        animation: none;
    }
}