/* 
  SarfiPay Premium Toast Notification System 
  Design Inspired by Modern FinTech & Algerian Glassmorphism
*/

.sarfipay-toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.sarfipay-toast, .toast-notification {
    background: rgba(15, 23, 42, 0.85); /* Deep slate with transparency */
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px 20px;
    min-width: 320px;
    max-width: 420px;
    color: #f8fafc;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.3);
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 14px;
    transform: translateX(120%);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
    overflow: hidden;
    position: relative;
}

.sarfipay-toast.show, .toast-notification.visible {
    transform: translateX(0);
    opacity: 1;
}

.sarfipay-toast::before, .toast-notification::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
}

/* Success State */
.sarfipay-toast.success::before, .toast-notification.success::before {
    background: #10b981; /* Emerald-500 */
}
.sarfipay-toast.success .toast-icon, .toast-notification.success .toast-icon {
    color: #10b981;
}

/* Error State */
.sarfipay-toast.error::before, .toast-notification.error::before {
    background: #ef4444; /* Red-500 */
}
.sarfipay-toast.error .toast-icon, .toast-notification.error .toast-icon {
    color: #ef4444;
}

/* Info State */
.sarfipay-toast.info::before {
    background: #3b82f6; /* Blue-500 */
}
.sarfipay-toast.info .toast-icon {
    color: #3b82f6;
}

.toast-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.toast-message {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
}

.toast-close {
    margin-left: auto;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    transition: color 0.2s;
}

.toast-close:hover {
    color: #fff;
}

/* Progress bar for auto-dismiss visual */
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    transform-origin: left;
}

.toast-progress-fill {
    height: 100%;
    background: currentColor;
    opacity: 0.3;
}

@keyframes toastProgress {
    from { transform: scaleX(1); }
    to { transform: scaleX(0); }
}

@media (max-width: 640px) {
    .sarfipay-toast-container {
        top: 16px;
        left: 16px;
        right: 16px;
    }
    .sarfipay-toast {
        min-width: 0;
        width: 100%;
    }
}
