﻿/* =========================================================
   TOAST ROOT
========================================================= */

#erpToastRoot {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 999999;
    display: flex;
    flex-direction: column-reverse;
    gap: 14px;
    pointer-events: none;
    max-width: calc(100vw - 32px);
}

/* =========================================================
   TOAST BASE
========================================================= */

.erp-toast {
    position: relative;
    overflow: hidden;
    min-width: 360px;
    max-width: 430px;
    border-radius: 22px;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    color: #0f172a;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 18px;
    pointer-events: auto;
    opacity: 0;
    transform: translateY(120%) scale(.92);
    transition: all .55s cubic-bezier(.16,1,.3,1);
}

    /* =========================================================
   SHOW
========================================================= */

    .erp-toast.show {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

    /* =========================================================
   HOVER
========================================================= */

    .erp-toast:hover {
        transform: translateY(-3px) scale(1.015);
    }

    /* =========================================================
   LEFT ACCENT BAR
========================================================= */

    .erp-toast::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        bottom: 0;
        width: 5px;
    }

/* =========================================================
   ICON
========================================================= */

.erp-toast-icon {
    width: 54px;
    height: 54px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 22px;
    transition: .3s;
}

/* =========================================================
   CONTENT
========================================================= */

.erp-toast-content {
    flex: 1;
    min-width: 0;
}

/* =========================================================
   TITLE
========================================================= */

.erp-toast-title {
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 6px;
    letter-spacing: .2px;
}

/* =========================================================
   MESSAGE
========================================================= */

.erp-toast-message {
    font-size: 13px;
    line-height: 1.55;
    color: #475569;
    word-break: break-word;
}

/* =========================================================
   CLOSE
========================================================= */

.erp-toast-close {
    border: none;
    background: none;
    color: #94a3b8;
    padding: 0;
    margin-top: 2px;
    transition: all .25s ease;
}

    .erp-toast-close:hover {
        color: #0f172a;
        transform: scale(1.08) rotate(90deg);
    }

/* =========================================================
   PROGRESS
========================================================= */

.erp-toast-progress {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 4px;
    transform-origin: left;
    animation: erpToastProgress linear forwards;
}

@keyframes erpToastProgress {

    from {
        transform: scaleX(1);
    }

    to {
        transform: scaleX(0);
    }
}

/* =========================================================
   SUCCESS
========================================================= */

.erp-toast-success {
    background: linear-gradient( 135deg, rgba(240,253,244,.96), rgba(220,252,231,.92) );
    border: 1px solid rgba(34,197,94,.18);
    box-shadow: 0 14px 38px rgba(34,197,94,.10), 0 4px 12px rgba(15,23,42,.05);
}

    .erp-toast-success::before {
        background: #22c55e;
    }

    .erp-toast-success .erp-toast-icon {
        background: rgba(34,197,94,.14);
        color: #16a34a;
        box-shadow: 0 0 18px rgba(34,197,94,.18);
    }

    .erp-toast-success .erp-toast-progress {
        background: #22c55e;
    }

/* =========================================================
   DANGER
========================================================= */

.erp-toast-danger {
    background: linear-gradient( 135deg, rgba(254,242,242,.96), rgba(254,226,226,.92) );
    border: 1px solid rgba(239,68,68,.18);
    box-shadow: 0 14px 38px rgba(239,68,68,.10), 0 4px 12px rgba(15,23,42,.05);
}

    .erp-toast-danger::before {
        background: #ef4444;
    }

    .erp-toast-danger .erp-toast-icon {
        background: rgba(239,68,68,.14);
        color: #dc2626;
        box-shadow: 0 0 18px rgba(239,68,68,.18);
    }

    .erp-toast-danger .erp-toast-progress {
        background: #ef4444;
    }

/* =========================================================
   WARNING
========================================================= */

.erp-toast-warning {
    background: linear-gradient( 135deg, rgba(255,251,235,.96), rgba(254,243,199,.92) );
    border: 1px solid rgba(245,158,11,.18);
    box-shadow: 0 14px 38px rgba(245,158,11,.10), 0 4px 12px rgba(15,23,42,.05);
}

    .erp-toast-warning::before {
        background: #f59e0b;
    }

    .erp-toast-warning .erp-toast-icon {
        background: rgba(245,158,11,.14);
        color: #d97706;
        box-shadow: 0 0 18px rgba(245,158,11,.18);
    }

    .erp-toast-warning .erp-toast-progress {
        background: #f59e0b;
    }

/* =========================================================
   INFO
========================================================= */

.erp-toast-info {
    background: linear-gradient( 135deg, rgba(239,246,255,.96), rgba(219,234,254,.92) );
    border: 1px solid rgba(59,130,246,.18);
    box-shadow: 0 14px 38px rgba(59,130,246,.10), 0 4px 12px rgba(15,23,42,.05);
}

    .erp-toast-info::before {
        background: #3b82f6;
    }

    .erp-toast-info .erp-toast-icon {
        background: rgba(59,130,246,.14);
        color: #2563eb;
        box-shadow: 0 0 18px rgba(59,130,246,.18);
    }

    .erp-toast-info .erp-toast-progress {
        background: #3b82f6;
    }

/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 768px) {

    #erpToastRoot {
        left: 12px;
        right: 12px;
        bottom: 12px;
    }

    .erp-toast {
        width: 100%;
        min-width: auto;
        max-width: none;
        border-radius: 18px;
        padding: 16px;
    }

    .erp-toast-icon {
        width: 46px;
        height: 46px;
        font-size: 20px;
    }
}
