/* CSS Document */

#my-toast-container{
    position: fixed;
    top: 24px;
    /*right: 24px;*/
    left: 50%;
    transform: translateX(-50%);

    display: flex;
    flex-direction: column;
    gap: 12px;

    z-index: 9999;
    pointer-events: none;
}

.my-toast {
    position: relative;
    
    display: flex;
    align-items: center;
    gap: 12px;
    
    background:#dff0d8;
    border:1px solid #d6e9c6;
    padding: 16px 18px;
    min-width: 320px;
    max-width: 420px;
    border-radius: 0px 0px 0px 0px;
    font-size: 15px;
    line-height: 1.4;

    overflow: hidden;
    pointer-events: auto;
    
    backdrop-filter: blur(16px);
    box-shadow:
        0 10px 25px rgba(0,0,0,.20),
        0 20px 50px rgba(0,0,0,.15);
    
    opacity:0;
    transform:translateY(10px);

    transition:
        opacity .8s ease,
        transform .8s ease;
}

.my-toast.show {
    opacity:1;
    transform:translateY(0);
}

.my-toast.hide {
    opacity:0;
    transform:translateY(-40px);
}
   
/* FARVER */
.my-toast.success {
  color: #3c763d;
  background-color: #dff0d8;
  border-color: #d6e9c6;
}

.my-toast.warning {
  color: #8a6d3b;
  background-color: #fcf8e3;
  border-color: #faebcc;
}

.my-toast.danger {
  color: #a94442;
  background-color: #f2dede;
  border-color: #ebccd1;
}

.my-toast.success .my-toast-progress {
    background: #3c763d; /* mørkere grøn */
}

.my-toast.warning .my-toast-progress {
    background: #8a6d3b; /* mørkere orange */
}

.my-toast.danger .my-toast-progress {
    background: #a94442; /* mørkere rød */
}
    
/* IKON */
.my-toast-icon {
    
    width: 40px;
    height: 40px;

    display: flex;
    align-items: center;
    justify-content: left;

    flex-shrink: 0;

    border-radius: 50%;

    font-size: 3.3rem;
    font-weight: bold;
    
    margin-bottom: 15px;

}
    
/* TEKST */
.my-toast-text {
    flex: 1;
    margin-bottom: 15px;
    font-weight: 600;
}
    
/* PROGRESS BAR */
.my-toast-progress {
    position: absolute;
    left: 0;
    bottom: 0;

    width: 100%;
    height: 3px;

    background: rgba(255,255,255,.2);

    transform-origin: left center;
    animation: timer 5s linear forwards;
}
   
/* ANIMATIONER */
@keyframes timer {

    from {
        transform: scaleX(1);
    }

    to {
        transform: scaleX(0);
    }
}


/* MOBIL */
@media (max-width: 768px) {

    #my-toast-container {
        top: 16px;
        left: 16px;
        right: 16px;
    }

    .my-toast {
        min-width: 0;
        width: 100%;
        max-width: none;
    }
}
    
