/**
 * Toastr Lite - Lightweight Toast Notifications
 * 
 * @package FOIA_Request_Manager
 * @since 1.1.0
 * 
 * Color Contrast Ratios (WCAG AA Compliant):
 * - Success: #166534 on #dcfce7 = 5.4:1 ✓
 * - Error: #991b1b on #fee2e2 = 6.7:1 ✓
 * - Warning: #92400e on #fef3c7 = 5.6:1 ✓
 * - Info: #1e3a8a on #dbeafe = 8.6:1 ✓
 */

#toastr-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 350px;
    width: 100%;
    pointer-events: none;
}

.toastr-toast {
    display: flex;
    align-items: flex-start;
    padding: 14px 16px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    pointer-events: auto;
    animation: toastr-slide-in 0.3s ease-out;
    position: relative;
    overflow: hidden;
}

.toastr-toast.toastr-hiding {
    animation: toastr-slide-out 0.3s ease-in forwards;
}

/* Toast Types with ADA-compliant contrast */
.toastr-success {
    background-color: #dcfce7;
    color: #166534;
    border-left: 4px solid #22c55e;
}

.toastr-error {
    background-color: #fee2e2;
    color: #991b1b;
    border-left: 4px solid #ef4444;
}

.toastr-warning {
    background-color: #fef3c7;
    color: #92400e;
    border-left: 4px solid #f59e0b;
}

.toastr-info {
    background-color: #dbeafe;
    color: #1e3a8a;
    border-left: 4px solid #3b82f6;
}

/* Toast Content */
.toastr-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin-right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toastr-icon svg {
    width: 100%;
    height: 100%;
}

.toastr-content {
    flex-grow: 1;
    padding-right: 24px;
}

.toastr-message {
    margin: 0;
    word-wrap: break-word;
}

/* Close Button */
.toastr-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    opacity: 0.7;
    transition: opacity 0.2s ease;
    color: inherit;
}

.toastr-close:hover {
    opacity: 1;
}

.toastr-close:focus {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

.toastr-close svg {
    width: 14px;
    height: 14px;
}

/* Progress Bar */
.toastr-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background-color: rgba(0, 0, 0, 0.15);
    width: 100%;
    animation: toastr-progress 5s linear forwards;
}

/* Animations */
@keyframes toastr-slide-in {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes toastr-slide-out {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

@keyframes toastr-progress {
    from {
        width: 100%;
    }
    to {
        width: 0%;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .toastr-toast {
        animation: none;
    }
    
    .toastr-toast.toastr-hiding {
        animation: none;
        opacity: 0;
    }
    
    .toastr-progress {
        animation: none;
        width: 0%;
    }
}

/* Mobile Responsive */
@media (max-width: 480px) {
    #toastr-container {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }

    .toastr-toast {
        font-size: 13px;
        padding: 12px 14px;
    }
}
