/* Beautiful Toast Notification Styles */
.toast-notification {
    position: fixed !important;
    top: 20px !important;
    right: 20px !important;
    min-width: 350px;
    max-width: 450px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    padding: 16px;
    z-index: 99999 !important;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    border-left: 5px solid;
    overflow: hidden;
    pointer-events: none;
}

.toast-notification.show {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
}

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

/* Toast Types */
.toast-success {
    border-left-color: #10b981;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
}

.toast-error {
    border-left-color: #ef4444;
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
}

.toast-warning {
    border-left-color: #f59e0b;
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
}

.toast-info {
    border-left-color: #3b82f6;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
}

/* Toast Icon */
.toast-icon {
    margin-right: 12px;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    flex-shrink: 0;
}

.toast-success .toast-icon {
    color: #10b981;
    background: rgba(16, 185, 129, 0.1);
}

.toast-error .toast-icon {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.toast-warning .toast-icon {
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.1);
}

.toast-info .toast-icon {
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.1);
}

/* Toast Content */
.toast-content {
    flex: 1;
    margin-right: 12px;
}

.toast-title {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 4px;
    color: #1f2937;
}

.toast-message {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.4;
}

/* Toast Close Button */
.toast-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #9ca3af;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #374151;
}

/* Progress Bar */
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.7));
    border-radius: 0 0 12px 12px;
    animation: progressBar 5s linear forwards;
}

.toast-success .toast-progress {
    background: linear-gradient(90deg, #10b981, #34d399);
}

.toast-error .toast-progress {
    background: linear-gradient(90deg, #ef4444, #f87171);
}

.toast-warning .toast-progress {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.toast-info .toast-progress {
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
}

@keyframes progressBar {
    from {
        width: 100%;
    }
    to {
        width: 0%;
    }
}

/* Responsive Design */
@media (max-width: 480px) {
    .toast-notification {
        right: 10px;
        left: 10px;
        min-width: auto;
        max-width: none;
        transform: translateY(-100%);
    }

    .toast-notification.show {
        transform: translateY(0);
    }

    .toast-notification.hide {
        transform: translateY(-100%);
    }
}

/* Legacy support for old topup message */
#topupMessage {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: #298f9e;
    border: 1px solid #002A3B;
    color: #e8e6df;
    padding: 7px;
    box-shadow: 0px 0px 10px #002A3B;
    border-radius: 5px;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-left: 15px;
    padding-right: 15px;
    font-size: 17px;
}

#closeTopup {
    background-color: transparent;
    border: none;
    color: #002A3B;
    font-size: 30px;
    margin-left: 10px;
    cursor: pointer;
}