﻿#pageMessageContainer {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 99999997;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 350px;
    width: calc(100vw - 40px);
    pointer-events: none;
}

.pm-toast {
    padding: 10px;
    border-radius: 16px;
    color: white;
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 320px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28) !important;
    transform: translateY(-100px) scale(0.95);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    position: relative;
    overflow: hidden;
    pointer-events: auto;
    z-index: 9999999;
    backdrop-filter: blur(10px);
}

.pm-toast-show {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.pm-toast-hide {
    transform: translateY(-100px) scale(0.95);
    opacity: 0;
}

/* Pulse animation for duplicate messages */
.pm-toast-pulse {
    animation: pmToastPulse 0.6s ease-out;
}

@keyframes pmToastPulse {
    0% {
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28), 0 0 0 0 rgba(76, 175, 80, 0.7);
        transform: translateY(0) scale(1);
    }

    50% {
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28), 0 0 0 10px rgba(76, 175, 80, 0);
        transform: translateY(0) scale(1.03);
    }

    100% {
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28), 0 0 0 0 rgba(76, 175, 80, 0);
        transform: translateY(0) scale(1);
    }
}

.pm-toast-timer {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: rgba(255, 255, 255, 0.4);
    transform-origin: left;
    border-radius: 16px 16px 0 0;
}

@keyframes pm-progress {
    from {
        transform: scaleX(1);
    }

    to {
        transform: scaleX(0);
    }
}

.pm-toast-success {
    background: linear-gradient(135deg, #38753a, #45a049);
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.pm-toast-error {
    background: linear-gradient(135deg, #c23328, #c82014);
    border: 1px solid rgba(244, 67, 54, 0.3);
}

.pm-toast-warning {
    background: linear-gradient(135deg, #ff9800, #f57c00);
    border: 1px solid rgba(255, 152, 0, 0.3);
}

.pm-toast-info {
    background: linear-gradient(135deg, #4391cf, #1976D2);
    border: 1px solid rgba(33, 150, 243, 0.3);
}

.pm-left-col {
    width: 30px;
    float: left;
    margin: 0px;
}

.pm-toast-icon {
    position: absolute;
    top: 8px;
    left: 10px;
    width: 30px;
    height: 30px;
}

.pm-toast-content {
    flex: 1;
    float: left;
}

.pm-toast-title {
    font-weight: 700;
    font-size: 17px;
    margin-bottom: 6px;
    line-height: 1.2;
}

.pm-toast-message {
    font-size: 14px;
    opacity: 0.92;
    line-height: 1.4;
}

.pm-toast-time {
    font-size: 11px;
    opacity: 0.7;
    margin-top: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pm-toast-close {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transition: all 0.2s;
    width: 27px;
    height: 27px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 4px;
    right: 4px;
}

    .pm-toast-close:hover {
        background: rgba(255, 255, 255, 0.25);
        transform: scale(1.1);
    }

    .pm-toast-close span {
        color: white;
        font-size: 20pt;
        position: absolute;
        top: -10px;
        left: 4px;
    }

@media (max-width: 768px) {

    #pageMessageContainer {
        width: calc(100vw - 20px);
    }

    .pm-toast {
        min-width: auto;
        padding: 16px 18px;
    }

    .pm-toast-icon {
        width: 38px;
        height: 38px;
        font-size: 22px;
    }

    .action-row {
        flex-direction: column;
        align-items: center;
    }
}
