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

.toast-container {
    position: fixed;

    top: 92px;
    right: 24px;

    z-index: 9999;

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

    display: flex;
    flex-direction: column;

    gap: 10px;

    pointer-events: none;
}


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

.app-toast {
    position: relative;

    display: grid;

    grid-template-columns:
        42px minmax(0, 1fr) 28px;

    align-items: center;

    gap: 12px;

    padding: 14px 14px;

    overflow: hidden;

    background:
        rgba(255, 255, 255, 0.98);

    border:
        1px solid rgba(224, 230, 238, 0.95);

    border-radius: 14px;

    box-shadow:
        0 18px 45px rgba(9, 47, 87, 0.16);

    opacity: 0;

    transform:
        translateX(30px) scale(0.98);

    transition:
        opacity 0.25s ease,
        transform 0.25s ease;

    pointer-events: auto;
}


/* ============================================================
   SHOW
============================================================ */

.app-toast.show {
    opacity: 1;

    transform:
        translateX(0) scale(1);
}


/* ============================================================
   HIDE
============================================================ */

.app-toast.hide {
    opacity: 0;

    transform:
        translateX(30px) scale(0.98);
}


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

.toast-icon {
    width: 42px;
    height: 42px;

    display: flex;

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

    border-radius: 11px;

    font-size: 16px;
}


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

.toast-content {
    min-width: 0;
}

.toast-title {
    display: block;

    margin-bottom: 3px;

    color: var(--primary);

    font-size: 12px;
    font-weight: 750;
}

.toast-message {
    display: block;

    color: var(--text-secondary);

    font-size: 11px;
    line-height: 1.45;
}


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

.toast-close {
    width: 28px;
    height: 28px;

    display: flex;

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

    color: #98a2b3;

    background: transparent;

    border-radius: 7px;

    font-size: 11px;

    transition: var(--transition);
}

.toast-close:hover {
    color: var(--primary);

    background: #f2f4f7;
}


/* ============================================================
   PROGRESS
============================================================ */

.toast-progress {
    position: absolute;

    bottom: 0;
    left: 0;

    width: 100%;
    height: 3px;

    transform-origin: left center;

    animation:
        toast-progress linear forwards;
}


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

.app-toast.toast-success .toast-icon {
    color: #198754;

    background: #eaf7f0;
}

.app-toast.toast-success .toast-progress {
    background: #198754;
}


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

.app-toast.toast-error .toast-icon {
    color: #dc3545;

    background: #fdecee;
}

.app-toast.toast-error .toast-progress {
    background: #dc3545;
}


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

.app-toast.toast-warning .toast-icon {
    color: #b77900;

    background: #fff5dc;
}

.app-toast.toast-warning .toast-progress {
    background: #f0a500;
}


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

.app-toast.toast-info .toast-icon {
    color: var(--accent);

    background: var(--accent-light);
}

.app-toast.toast-info .toast-progress {
    background: var(--accent);
}


/* ============================================================
   ANIMATION
============================================================ */

@keyframes toast-progress {

    from {
        transform: scaleX(1);
    }

    to {
        transform: scaleX(0);
    }

}


/* ============================================================
   MOBILE
============================================================ */

@media (max-width: 600px) {

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

        width: auto;
    }

}