.notification-container {
    position: fixed;
    top: calc(max(0.5rem, env(safe-area-inset-top, 0px)) + 2.75rem);
    bottom: auto;
    right: calc((100vw - min(100vw, 480px)) / 2 + max(0.35rem, env(safe-area-inset-right, 0px)));
    z-index: 10200;
    pointer-events: none;
    width: auto;
    max-width: min(55vw, 210px);
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0;
    background: transparent;
}

.notification-container:empty {
    display: none;
}

.notification {
    width: auto;
    max-width: 100%;
    padding: 2px 6px 2px 5px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.2;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    transform: translateX(110%);
    opacity: 0;
    transition: transform 0.28s ease, opacity 0.22s ease;
    pointer-events: auto;
    background: rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: none;
    color: rgba(255, 255, 255, 0.92);
}

.notification.show {
    transform: translateX(0);
    opacity: 1;
}

.notification.hide {
    transform: translateX(110%);
    opacity: 0;
}

.notification.success {
    background: rgba(76, 175, 80, 0.2);
    border-color: rgba(76, 175, 80, 0.35);
    color: #a8f0b8;
}

.notification.warning {
    background: rgba(255, 152, 0, 0.2);
    border-color: rgba(255, 152, 0, 0.35);
    color: #ffd699;
}

.notification.danger,
.notification.error {
    background: rgba(244, 67, 54, 0.2);
    border-color: rgba(244, 67, 54, 0.35);
    color: #ffb4ae;
}

.notification.info {
    background: rgba(33, 150, 243, 0.2);
    border-color: rgba(33, 150, 243, 0.35);
    color: #a8d8ff;
}

[data-theme="light"] .notification {
    background: rgba(255, 255, 255, 0.55);
    border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .notification.success {
    color: #1b7a3a;
}

[data-theme="light"] .notification.warning {
    color: #b36a00;
}

[data-theme="light"] .notification.danger,
[data-theme="light"] .notification.error {
    color: #c62828;
}

[data-theme="light"] .notification.info {
    color: #1565c0;
}

.notification-icon {
    font-size: 11px;
    flex-shrink: 0;
    line-height: 1;
}

.notification-content {
    flex: 0 1 auto;
    min-width: 0;
    max-width: 20ch;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notification-close {
    background: none;
    border: none;
    color: inherit;
    font-size: 12px;
    cursor: pointer;
    opacity: 0.75;
    transition: opacity 0.2s;
    flex-shrink: 0;
    padding: 0;
    margin-left: 1px;
    line-height: 1;
    width: 12px;
    height: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-close:hover {
    opacity: 1;
}
