/**
 * Modern Toast Notification Styles
 * RTL-compatible notification system for Persian web applications
 */

.notification-container {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 420px;
    pointer-events: none;
}

.notification {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    font-family: 'Vazirmatn', sans-serif;
    font-size: 0.95rem;
    line-height: 1.5;
    direction: rtl;
    text-align: right;
    pointer-events: auto;
    transform: translateX(-120%);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    min-height: 60px;
    position: relative;
    overflow: hidden;
}

.notification::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 4px;
    height: 100%;
    background: currentColor;
}

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

.notification.hide {
    transform: translateX(-120%);
    opacity: 0;
}

.notification-icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-message {
    word-wrap: break-word;
    font-weight: 500;
}

.notification-close {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border: none;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    color: inherit;
    font-size: 0.9rem;
    margin-right: 8px;
}

.notification-close:hover {
    background: rgba(0, 0, 0, 0.2);
    transform: scale(1.1);
}

.notification-close:active {
    transform: scale(0.95);
}

/* Success Notification */
.notification-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border: 1px solid #c3e6cb;
}

.notification-success::before {
    background: #28a745;
}

.notification-success .notification-icon {
    color: #28a745;
}

/* Error Notification */
.notification-error {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.notification-error::before {
    background: #dc3545;
}

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

/* Warning Notification */
.notification-warning {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    color: #856404;
    border: 1px solid #ffeaa7;
}

.notification-warning::before {
    background: #ffc107;
}

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

/* Info Notification */
.notification-info {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.notification-info::before {
    background: #17a2b8;
}

.notification-info .notification-icon {
    color: #17a2b8;
}

/* Responsive Design */
@media (max-width: 768px) {
    .notification-container {
        top: 10px;
        left: 10px;
        right: 10px;
        max-width: none;
    }

    .notification {
        padding: 14px 16px;
        font-size: 0.9rem;
    }

    .notification-icon {
        width: 24px;
        height: 24px;
        font-size: 1.2rem;
    }
}

/* Animation for stacked notifications */
.notification:nth-child(n+4) {
    opacity: 0.7;
    transform: scale(0.95) translateX(0);
}

.notification:nth-child(n+4).show {
    opacity: 0.7;
}

/* Hover effect */
.notification:hover {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
    transform: translateX(0) scale(1.02);
}

.notification:hover:nth-child(n+4) {
    opacity: 1;
    transform: scale(1.02) translateX(0);
}

/* Progress bar for auto-dismiss */
.notification-progress {
    position: absolute;
    bottom: 0;
    right: 0;
    left: 0;
    height: 3px;
    background: rgba(0, 0, 0, 0.1);
    transform-origin: left;
    animation: progress linear forwards;
}

@keyframes progress {
    from {
        transform: scaleX(1);
    }
    to {
        transform: scaleX(0);
    }
}
