/* Toast Notification Styles - Local Implementation */
.toast-container {
    position: fixed;
    z-index: 9999;
    pointer-events: none;
}

/* Positions */
.toast-container.top-right {
    top: 20px;
    right: 20px;
}

.toast-container.top-left {
    top: 20px;
    left: 20px;
}

.toast-container.top-center {
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
}

.toast-container.bottom-right {
    bottom: 20px;
    right: 20px;
}

.toast-container.bottom-left {
    bottom: 20px;
    left: 20px;
}

.toast-container.bottom-center {
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
}

.toast-notification {
    display: flex;
    align-items: center;
    min-width: 300px;
    max-width: 450px;
    padding: 14px 20px;
    margin-bottom: 12px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    pointer-events: auto;
    animation: slideIn 0.3s ease-out;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    cursor: pointer;
    overflow: hidden;
    position: relative;
}

.toast-notification::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
}

.toast-notification.hiding {
    animation: slideOut 0.3s ease-in forwards;
}

.toast-notification .toast-icon {
    margin-left: 12px;
    font-size: 18px;
    flex-shrink: 0;
}

.toast-notification .toast-message {
    flex: 1;
    word-wrap: break-word;
}

.toast-notification .toast-close {
    margin-right: 12px;
    font-size: 18px;
    opacity: 0.7;
    transition: opacity 0.2s;
    cursor: pointer;
    flex-shrink: 0;
}

.toast-notification .toast-close:hover {
    opacity: 1;
}

.toast-notification .toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.4);
    transform-origin: left;
}

/* Success */
.toast-notification.success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
}

.toast-notification.success::before {
    background: #1e7e34;
}

/* Error */
.toast-notification.error {
    background: linear-gradient(135deg, #dc3545 0%, #e74c3c 100%);
    color: white;
}

.toast-notification.error::before {
    background: #a71d2a;
}

/* Warning */
.toast-notification.warning {
    background: linear-gradient(135deg, #ffc107 0%, #ffb300 100%);
    color: #212529;
}

.toast-notification.warning::before {
    background: #d39e00;
}

/* Information */
.toast-notification.information {
    background: linear-gradient(135deg, #17a2b8 0%, #3498db 100%);
    color: white;
}

.toast-notification.information::before {
    background: #117a8b;
}

/* Animations */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* RTL Support */
[dir="rtl"] .toast-notification {
    animation-name: slideInRtl;
}

[dir="rtl"] .toast-notification.hiding {
    animation-name: slideOutRtl;
}

[dir="rtl"] .toast-notification .toast-icon {
    margin-left: 0;
    margin-right: 12px;
}

[dir="rtl"] .toast-notification .toast-close {
    margin-right: 0;
    margin-left: 12px;
}

[dir="rtl"] .toast-notification::before {
    left: auto;
    right: 0;
}

@keyframes slideInRtl {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRtl {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(-100%);
        opacity: 0;
    }
}

/* Responsive */
@media (max-width: 480px) {
    .toast-container {
        left: 10px !important;
        right: 10px !important;
        transform: none !important;
    }
    
    .toast-notification {
        min-width: auto;
        max-width: none;
    }
}
