.vahu-alert {
    position: fixed;
    top: 90px;
    right: 24px;

    min-width: 320px;
    padding: 16px 20px;

    border-radius: 12px;
    color: #fff;

    font-size: 14px;
    font-weight: 500;

    z-index: 2147483647 !important;
}

.vahu-alert.success {
    background: linear-gradient(135deg, #7ED6B2, #FFCAA6);
}

.vahu-alert.error {
    background: linear-gradient(135deg, #E57373, #EF9A9A);
}

.vahu-alert.warning {
    background: linear-gradient(135deg, #FFD54F, #FFB74D);
}

.vahu-alert.info {
    background: linear-gradient(135deg, #64B5F6, #81D4FA);
}

/* ==========================================================
   ALERT CONTAINER
   ========================================================== */

.vahu-alert-container {
    position: fixed;
    top: 90px;
    right: 24px;

    display: flex;
    flex-direction: column;
    gap: 12px;

    width: min(380px, calc(100vw - 32px));

    z-index: 99999;
    pointer-events: none;
}


/* ==========================================================
   ALERT
   ========================================================== */

.vahu-alert {
    position: relative;
    overflow: hidden;

    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 10px;

    width: 100%;
    padding: 16px 18px;

    border-radius: var(--vahu-radius);
    color: var(--vahu-alert-text);

    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;

    box-shadow: var(--vahu-shadow-hover);

    pointer-events: auto;

    opacity: 0;
    transform: translateX(36px);

    transition:
        opacity .25s ease,
        transform .25s ease;
}

.vahu-alert.is-visible {
    opacity: 1;
    transform: translateX(0);
}

.vahu-alert.is-closing {
    opacity: 0;
    transform: translateX(36px);
}


/* ==========================================================
   TYPES
   ========================================================== */

.vahu-alert-success {
    background: var(--vahu-alert-success-bg);
}

.vahu-alert-error {
    background: var(--vahu-alert-error-bg);
}

.vahu-alert-warning {
    background: var(--vahu-alert-warning-bg);
}

.vahu-alert-info {
    background: var(--vahu-alert-info-bg);
}


/* ==========================================================
   CONTENT
   ========================================================== */

.vahu-alert-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 24px;
    height: 24px;

    font-size: 18px;
    line-height: 1;
}

.vahu-alert-message {
    min-width: 0;
}

.vahu-alert-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 28px;
    height: 28px;
    padding: 0;

    border: 0;
    border-radius: 50%;

    background: transparent;
    color: inherit;

    font: inherit;
    font-size: 20px;
    line-height: 1;

    cursor: pointer;

    transition: background .2s ease;
}

.vahu-alert-close:hover {
    background: var(--vahu-alert-close-bg-hover);
}


/* ==========================================================
   PROGRESS
   ========================================================== */

.vahu-alert-progress {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;

    height: 3px;

    background: var(--vahu-alert-progress-bg);
    transform-origin: left center;

    animation-name: vahu-alert-progress;
    animation-timing-function: linear;
    animation-fill-mode: forwards;
}

.vahu-alert.is-paused .vahu-alert-progress {
    animation-play-state: paused;
}

@keyframes vahu-alert-progress {
    from {
        transform: scaleX(1);
    }

    to {
        transform: scaleX(0);
    }
}


/* ==========================================================
   MOBILE
   ========================================================== */

@media (max-width: 640px) {
    .vahu-alert-container {
        top: 76px;
        right: 16px;
        left: 16px;

        width: auto;
    }
}