﻿/* ================================
   PREMIUM TOAST NOTIFICATION
================================ */

#toast-container {
    position: fixed;
    top: 22px;
    right: 22px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 420px;
    max-width: calc(100vw - 32px);
    pointer-events: none;
}

    /* Main Toast Card */
    #toast-container .toast {
        --toast-color: #3b82f6;
        --toast-soft: rgba(59, 130, 246, 0.10);
        position: relative;
        display: flex;
        align-items: center;
        gap: 14px;
        width: 100%;
        min-width: 0;
        padding: 18px 20px;
        background: rgba(255, 255, 255, 0.97);
        border: 1px solid rgba(226, 232, 240, 0.9);
        border-left: 4px solid var(--toast-color);
        border-radius: 16px;
        box-shadow: 0 12px 35px rgba(15, 23, 42, 0.10), 0 3px 10px rgba(15, 23, 42, 0.04);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        overflow: hidden;
        pointer-events: auto;
        animation: premiumToastIn 0.4s cubic-bezier(0.21, 1.02, 0.73, 1);
    }

        /* Bottom Timer Line */
        #toast-container .toast::before {
            content: "";
            position: absolute;
            bottom: 0;
            left: 0;
            width: 100%;
            height: 3px;
            background: var(--toast-color);
            opacity: 0.75;
            animation: premiumToastProgress 5s linear forwards;
        }

        /* Subtle Top Highlight */
        #toast-container .toast::after {
            content: "";
            position: absolute;
            top: 0;
            left: 15px;
            right: 15px;
            height: 1px;
            background: linear-gradient( 90deg, transparent, rgba(255, 255, 255, 0.95), transparent );
            pointer-events: none;
        }

        /* Success */
        #toast-container .toast.success {
            --toast-color: #059669;
            --toast-soft: #ecfdf5;
        }

        /* Error */
        #toast-container .toast.error {
            --toast-color: #dc2626;
            --toast-soft: #fef2f2;
        }

        /* Warning */
        #toast-container .toast.warning {
            --toast-color: #d97706;
            --toast-soft: #fffbeb;
        }

        /* Info */
        #toast-container .toast.info {
            --toast-color: #2563eb;
            --toast-soft: #eff6ff;
        }

    /* Icon Circle */
    #toast-container .toast-icon {
        width: 44px;
        height: 44px;
        min-width: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 13px;
        background: var(--toast-soft);
        color: var(--toast-color);
        font-size: 20px;
        font-weight: 600;
        box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.65);
    }

    /* Content */
    #toast-container .toast-content {
        flex: 1;
        min-width: 0;
        padding: 0;
        color: #0f172a;
    }

    /* Message Text */
    #toast-container .toast-message {
        margin: 0;
        color: #475569;
        font-family: inherit;
        font-size: 13px;
        font-weight: 500;
        line-height: 1.65;
        overflow-wrap: anywhere;
    }

    /* Close Button */
    #toast-container .toast-close {
        width: 30px;
        height: 30px;
        min-width: 30px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0;
        border: none;
        border-radius: 9px;
        background: transparent;
        color: #94a3b8;
        font-size: 19px;
        line-height: 1;
        cursor: pointer;
        transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
    }

        #toast-container .toast-close:hover {
            background: #f1f5f9;
            color: #0f172a;
            transform: rotate(90deg);
        }

/* Entry Animation */
@keyframes premiumToastIn {
    from {
        opacity: 0;
        transform: translate3d(35px, -5px, 0) scale(0.96);
    }

    to {
        opacity: 1;
        transform: translate3d(0, 0, 0) scale(1);
    }
}

/* Timer Animation */
@keyframes premiumToastProgress {
    from {
        width: 100%;
    }

    to {
        width: 0%;
    }
}

/* Exit Animation */
@keyframes premiumToastOut {
    from {
        opacity: 1;
        transform: translateX(0) scale(1);
        max-height: 160px;
        margin-bottom: 0;
    }

    to {
        opacity: 0;
        transform: translateX(35px) scale(0.96);
        max-height: 0;
        margin-bottom: -14px;
    }
}

#toast-container .toast.removing {
    animation: premiumToastOut 0.3s ease forwards;
    pointer-events: none;
}

/* Logo */
img.imagelogo {
    width: 100%;
    height: 100% !important;
    object-fit: contain;
}

/* Loading Spinner */
.ri-spin {
    display: inline-block;
    font-size: 1.25rem;
    transform-origin: center center;
    animation: ri-spin 1s linear infinite;
}

@keyframes ri-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Tablet & Mobile */
@media (max-width: 768px) {
    #toast-container {
        top: 12px;
        right: 12px;
        left: 12px;
        width: auto;
        max-width: none;
        gap: 10px;
    }

        #toast-container .toast {
            padding: 14px 15px;
            gap: 12px;
            border-radius: 14px;
        }

        #toast-container .toast-icon {
            width: 39px;
            height: 39px;
            min-width: 39px;
            border-radius: 11px;
            font-size: 18px;
        }

        #toast-container .toast-message {
            font-size: 12px;
        }

        #toast-container .toast-close {
            width: 27px;
            height: 27px;
            min-width: 27px;
        }
}

/* Reduced Motion Accessibility */
@media (prefers-reduced-motion: reduce) {
    #toast-container .toast,
    #toast-container .toast.removing,
    #toast-container .toast::before,
    .ri-spin {
        animation-duration: 0.01ms !important;
    }

    #toast-container .toast-close {
        transition: none;
    }
}
