﻿/* ============================================================ */
/*                    NOTIFICATION TOAST STYLES                 */
/* ============================================================ */
.notification-toast {
    position: absolute;
    top: 16px;
    left: 16px;
    right: 16px;
    z-index: 1100;
    background: linear-gradient(135deg, #0f8bab 0%, #0c7d9a 100%);
    color: #ffffff;
    padding: 14px 16px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 8px 28px rgba(15, 139, 171, 0.38), 0 2px 6px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    opacity: 0;
    transform: translateY(-18px) scale(0.94);
    transition: opacity 0.45s cubic-bezier(0.215, 0.61, 0.355, 1), transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: none;
    direction: rtl;
    font-size: 16px; /* کمی بزرگتر */
    font-weight: 500;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

    /* Visible state */
    .notification-toast.show {
        opacity: 1;
        transform: translateY(0) scale(1);
        pointer-events: auto;
    }

    /* Exit state */
    .notification-toast.hide {
        opacity: 0;
        transform: translateY(-18px) scale(0.92);
        transition: opacity 0.3s ease-in, transform 0.35s ease-in;
        pointer-events: none;
    }

    /* Toast icon */
    .notification-toast .toast-icon {
        font-size: 22px;
        flex-shrink: 0;
        animation: toastIconBounce 0.55s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
        filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.15));
    }

    /* Toast message text */
    .notification-toast .toast-message {
        flex: 1;
        text-align: right;
        line-height: 1.55;
        font-size: 16px; /* افزایش یافته */
        letter-spacing: 0.01em;
    }

    /* Close button */
    .notification-toast .toast-close {
        font-size: 18px;
        cursor: pointer;
        flex-shrink: 0;
        opacity: 0.7;
        transition: opacity 0.2s;
        padding: 4px 6px;
        border-radius: 6px;
        line-height: 1;
    }

        .notification-toast .toast-close:hover {
            opacity: 1;
            background: rgba(255, 255, 255, 0.18);
        }

    /* Progress bar container */
    .notification-toast .toast-progress {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        height: 3.5px;
        background: rgba(255, 255, 255, 0.25);
        border-radius: 0 0 12px 12px;
        overflow: hidden;
    }

    /* Animated progress bar */
    .notification-toast .toast-progress-bar {
        height: 100%;
        background: #ffffff;
        border-radius: 0 0 12px 12px;
        animation: toastProgressShrink 3.8s linear forwards;
        transform-origin: right center;
    }

/* ========== Keyframes ========== */
@keyframes toastIconBounce {
    0% {
        transform: scale(0) rotate(-20deg);
        opacity: 0;
    }

    55% {
        transform: scale(1.35) rotate(6deg);
        opacity: 1;
    }

    75% {
        transform: scale(0.88) rotate(-3deg);
    }

    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

@keyframes toastProgressShrink {
    from {
        width: 100%;
    }

    to {
        width: 0%;
    }
}

/* ========== Mobile toast adjustments ========== */
@media (max-width: 440px) {
    .notification-toast {
        top: 10px;
        left: 10px;
        right: 10px;
        padding: 12px 14px;
        font-size: 15px; /* افزایش یافته */
        border-radius: 10px;
    }

        .notification-toast .toast-icon {
            font-size: 20px;
        }

        .notification-toast .toast-message {
            font-size: 15px; /* افزایش یافته */
        }

        .notification-toast .toast-progress {
            border-radius: 0 0 10px 10px;
        }

        .notification-toast .toast-progress-bar {
            border-radius: 0 0 10px 10px;
        }
}
