.somnia-alert-container {
    position: fixed;

    top: 16px;
    right: 16px;

    z-index: 999999;

    width: 360px;
    max-width: calc(100vw - 32px);

    display: flex;
    flex-direction: column;

    gap: 10px;
}

.somnia-alert {
    position: relative;

    display: grid;

    grid-template-columns: 52px 1fr;

    column-gap: 12px;

    align-items: center;

    padding: 14px 42px 14px 14px;

    border-radius: 22px;

    background:
        linear-gradient(
            135deg,
            rgba(255, 255, 255, 0.34),
            rgba(255, 255, 255, 0.18)
        );

    backdrop-filter: blur(32px) saturate(180%);
    -webkit-backdrop-filter: blur(32px) saturate(180%);

    box-shadow:
        0 8px 30px rgba(0, 0, 0, 0.16),
        inset 0 1px 0 rgba(255, 255, 255, 0.28),
        inset 0 -1px 0 rgba(255, 255, 255, 0.10);

    overflow: hidden;

    animation:
        somniaSlideIn 0.26s ease-out;

    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "SF Pro Display",
        "Segoe UI",
        sans-serif;

    color: #111111;
}

.somnia-alert::before {
    content: '';

    position: absolute;

    inset: 0;

    border-radius: inherit;

    background:
        linear-gradient(
            180deg,
            rgba(255,255,255,0.24),
            rgba(255,255,255,0.02)
        );

    pointer-events: none;
}

.somnia-alert-icon-wrapper {
    display: flex;

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

    align-self: center;

    height: 100%;

    z-index: 1;
}

.somnia-alert-icon {
    width: 52px;
    height: 52px;

    min-width: 52px;

    border-radius: 16px;

    display: flex;

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

    color: #ffffff;

    font-size: 28px;
    /* font-weight: 700; */

    line-height: 1;

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.28),
        0 4px 12px rgba(0,0,0,0.14);
}

.somnia-alert-success .somnia-alert-icon {
    background:
        linear-gradient(
            135deg,
            #66e24f,
            #27c93f
        );
}

.somnia-alert-error .somnia-alert-icon {
    background:
        linear-gradient(
            135deg,
            #ff6a5f,
            #ff3b30
        );
}

.somnia-alert-warning .somnia-alert-icon {
    background:
        linear-gradient(
            135deg,
            #ffb340,
            #ff9500
        );
}

.somnia-alert-info .somnia-alert-icon {
    background:
        linear-gradient(
            135deg,
            #4aa8ff,
            #007aff
        );
}

.somnia-alert-content {
    position: relative;

    z-index: 1;

    min-width: 0;
}

.somnia-alert-top {
    display: flex;

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

    gap: 10px;

    margin-bottom: 2px;
}

.somnia-alert-label {
    font-size: 11px;
    font-weight: 600;

    letter-spacing: 0.2px;

    text-transform: uppercase;

    color:
        rgba(0,0,0,0.46);
}

.somnia-alert-time {
    font-size: 11px;

    white-space: nowrap;

    color:
        rgba(0,0,0,0.42);
}

.somnia-alert-title {
    font-size: 17px;
    font-weight: 700;

    margin-bottom: 2px;

    color: #111111;
}

.somnia-alert-message {
    font-size: 14px;

    line-height: 1.32;

    color:
        rgba(0,0,0,0.82);
}

.somnia-alert-close {
    position: absolute;

    top: 50%;
    right: 14px;

    transform: translateY(-50%);

    z-index: 2;

    border: none;

    background: transparent;

    color:
        rgba(0,0,0,0.34);

    font-size: 30px;
    font-weight: 300;

    line-height: 1;

    cursor: pointer;

    padding: 0;

    transition:
        color 0.15s ease,
        transform 0.15s ease;
}

.somnia-alert-close:hover {
    color:
        rgba(0,0,0,0.68);

    transform:
        translateY(-50%)
        scale(1.04);
}

@keyframes somniaSlideIn {

    from {

        opacity: 0;

        transform:
            translateY(-18px)
            scale(0.97);
    }

    to {

        opacity: 1;

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

@keyframes somniaSlideOut {

    from {

        opacity: 1;

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

    to {

        opacity: 0;

        transform:
            translateY(-14px)
            scale(0.97);
    }
}

@media (max-width: 480px) {

    .somnia-alert-container {

        top: 12px;
        right: 12px;
        left: 12px;

        width: auto;

        max-width: none;
    }

    .somnia-alert {

        grid-template-columns: 46px 1fr;

        column-gap: 10px;

        padding: 12px 38px 12px 12px;

        border-radius: 18px;
    }

    .somnia-alert-icon {

        width: 46px;
        height: 46px;

        min-width: 46px;

        border-radius: 14px;

        font-size: 24px;
    }

    .somnia-alert-label,
    .somnia-alert-time {

        font-size: 10px;
    }

    .somnia-alert-title {

        font-size: 15px;
    }

    .somnia-alert-message {

        font-size: 13px;
    }

    .somnia-alert-close {

        right: 12px;

        font-size: 24px;
    }
}