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

:root {
    --toast-bg: #0a1525;
    --toast-border: rgba(255, 255, 255, 0.09);
    --toast-text: #f5f8fc;
    --toast-muted: #8c9bb0;

    --toast-success: #4ade80;
    --toast-error: #f87171;
    --toast-warning: #fbbf24;
    --toast-info: #60a5fa;
}


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

.toast-container {

    position: fixed;

    top: 24px;
    right: 24px;

    z-index: 999999;

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

    display: flex;

    flex-direction: column;

    gap: 12px;

    pointer-events: none;

}


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

.toast {

    position: relative;

    display: flex;

    align-items: flex-start;

    gap: 13px;

    padding: 16px;

    border:
        1px solid
        var(--toast-border);

    border-radius: 14px;

    background:
        linear-gradient(
            145deg,
            rgba(13, 27, 46, 0.98),
            rgba(6, 14, 26, 0.98)
        );

    box-shadow:
        0 20px 50px
        rgba(0, 0, 0, 0.35);

    backdrop-filter: blur(18px);

    color: var(--toast-text);

    pointer-events: auto;

    overflow: hidden;

    animation:
        toastEnter 0.35s ease forwards;

}


/* =========================================
   EXIT
========================================= */

.toast.toast-removing {

    animation:
        toastExit 0.3s ease forwards;

}


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

.toast-icon {

    flex: 0 0 auto;

    width: 36px;
    height: 36px;

    display: flex;

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

    border-radius: 10px;

    font-size: 0.95rem;

    font-weight: 700;

}


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

.toast-content {

    min-width: 0;

    flex: 1;

}

.toast-title {

    margin: 0 0 4px;

    color: var(--toast-text);

    font-size: 0.88rem;

    font-weight: 700;

    line-height: 1.3;

}

.toast-message {

    margin: 0;

    color: var(--toast-muted);

    font-size: 0.78rem;

    line-height: 1.55;

    overflow-wrap: anywhere;

}


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

.toast-close {

    flex: 0 0 auto;

    width: 28px;
    height: 28px;

    display: flex;

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

    border: none;

    border-radius: 7px;

    background: transparent;

    color: #718197;

    cursor: pointer;

    font-size: 1.1rem;

    line-height: 1;

    transition:
        background 0.2s ease,
        color 0.2s ease;

}

.toast-close:hover {

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

    color: #ffffff;

}


/* =========================================
   TYPES
========================================= */

.toast-success {

    border-color:
        rgba(74, 222, 128, 0.22);

}

.toast-success .toast-icon {

    background:
        rgba(74, 222, 128, 0.10);

    color:
        var(--toast-success);

}


.toast-error {

    border-color:
        rgba(248, 113, 113, 0.22);

}

.toast-error .toast-icon {

    background:
        rgba(248, 113, 113, 0.10);

    color:
        var(--toast-error);

}


.toast-warning {

    border-color:
        rgba(251, 191, 36, 0.22);

}

.toast-warning .toast-icon {

    background:
        rgba(251, 191, 36, 0.10);

    color:
        var(--toast-warning);

}


.toast-info {

    border-color:
        rgba(96, 165, 250, 0.22);

}

.toast-info .toast-icon {

    background:
        rgba(96, 165, 250, 0.10);

    color:
        var(--toast-info);

}


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

.toast-progress {

    position: absolute;

    left: 0;
    bottom: 0;

    width: 100%;

    height: 2px;

    transform-origin: left;

    animation:
        toastProgress var(--toast-duration, 4000ms)
        linear forwards;

}


.toast-success .toast-progress {
    background: var(--toast-success);
}

.toast-error .toast-progress {
    background: var(--toast-error);
}

.toast-warning .toast-progress {
    background: var(--toast-warning);
}

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


/* =========================================
   ANIMATIONS
========================================= */

@keyframes toastEnter {

    from {

        opacity: 0;

        transform:
            translateX(35px)
            scale(0.96);

    }

    to {

        opacity: 1;

        transform:
            translateX(0)
            scale(1);

    }

}


@keyframes toastExit {

    from {

        opacity: 1;

        transform:
            translateX(0)
            scale(1);

    }

    to {

        opacity: 0;

        transform:
            translateX(35px)
            scale(0.96);

    }

}


@keyframes toastProgress {

    from {
        transform: scaleX(1);
    }

    to {
        transform: scaleX(0);
    }

}


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

@media (max-width: 600px) {

    .toast-container {

        top: 14px;

        left: 16px;
        right: 16px;

        width: auto;

    }

    .toast {

        padding: 14px;

        border-radius: 12px;

    }

}


/* =========================================
   REDUCED MOTION
========================================= */

@media (prefers-reduced-motion: reduce) {

    .toast,
    .toast.toast-removing,
    .toast-progress {

        animation: none !important;

    }

}


@media (max-width: 768px) {
    input,
    select,
    textarea {
        font-size: 16px !important;
    }
}