/* =====================================================
   SPI UI Framework
   Notification / Toast
   Version : 1.0.0
===================================================== */


/* =====================================================
   CONTAINER
===================================================== */

.spi-toast-container{
    position:fixed;

    top:24px;
    right:24px;

    z-index:9999;

    display:flex;
    flex-direction:column;

    width:min(400px, calc(100vw - 32px));

    gap:12px;

    pointer-events:none;
}


/* =====================================================
   TOAST
===================================================== */

.spi-toast{
    display:flex;
    align-items:flex-start;

    gap:12px;

    width:100%;

    padding:16px;

    background:#ffffff;

    border:1px solid #e2e8f0;
    border-radius:12px;

    box-shadow:
        0 12px 30px rgba(15, 23, 42, .12);

    pointer-events:auto;

    opacity:0;

    transform:translateX(30px);

    transition:
        opacity .25s ease,
        transform .25s ease;
}


.spi-toast.spi-toast-show{
    opacity:1;

    transform:translateX(0);
}


/* =====================================================
   ICON
===================================================== */

.spi-toast-icon{
    flex:0 0 auto;

    display:flex;
    align-items:center;
    justify-content:center;

    width:36px;
    height:36px;

    border-radius:50%;

    font-size:17px;
    font-weight:700;
}


/* =====================================================
   CONTENT
===================================================== */

.spi-toast-content{
    flex:1;

    min-width:0;
}


.spi-toast-title{
    margin-bottom:4px;

    color:#0f172a;

    font-size:14px;
    font-weight:700;

    line-height:1.4;
}


.spi-toast-message{
    color:#64748b;

    font-size:13px;
    line-height:1.55;
}


/* =====================================================
   CLOSE
===================================================== */

.spi-toast-close{
    flex:0 0 auto;

    display:flex;
    align-items:center;
    justify-content:center;

    width:28px;
    height:28px;

    padding:0;

    border:0;

    border-radius:6px;

    background:transparent;

    color:#94a3b8;

    font-size:20px;

    cursor:pointer;

    transition:
        background .15s ease,
        color .15s ease;
}


.spi-toast-close:hover{
    background:#f1f5f9;

    color:#334155;
}


/* =====================================================
   SUCCESS
===================================================== */

.spi-toast-success{
    border-left:4px solid #16a34a;
}


.spi-toast-success .spi-toast-icon{
    background:#dcfce7;

    color:#15803d;
}


/* =====================================================
   ERROR
===================================================== */

.spi-toast-danger{
    border-left:4px solid #dc2626;
}


.spi-toast-danger .spi-toast-icon{
    background:#fee2e2;

    color:#b91c1c;
}


/* =====================================================
   WARNING
===================================================== */

.spi-toast-warning{
    border-left:4px solid #f59e0b;
}


.spi-toast-warning .spi-toast-icon{
    background:#fef3c7;

    color:#b45309;
}


/* =====================================================
   INFO
===================================================== */

.spi-toast-info{
    border-left:4px solid #2563eb;
}


.spi-toast-info .spi-toast-icon{
    background:#dbeafe;

    color:#1d4ed8;
}


/* =====================================================
   RESPONSIVE
===================================================== */

@media(max-width:768px){

    .spi-toast-container{
        top:16px;
        right:16px;
        left:16px;

        width:auto;
    }

}