﻿notification-hub {
    height: 40px;
    position: fixed;
    bottom: -50%;
    left: 0;
    width: 100%;
    opacity: 1;
    z-index: 999999;
}

toast-notification {
    position: fixed;
    z-index: 999;
    background-color: var(--bg-secondary);
    padding: 1rem 1.25rem;
    border-radius: 0.75rem;
    transition: all .6s cubic-bezier(.47, 1.64, .41, .8);
    margin: 1rem;
    width: auto;
    min-width: 320px;
    max-width: 420px;
    display: flex;
    align-items: center;
    flex-direction: row;
    gap: 1rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    right: 0;
    border-left: 4px solid transparent;
    backdrop-filter: blur(10px);
}

    toast-notification::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        opacity: 0.1;
        z-index: -1;
    }

    toast-notification::after {
        content: "";
        position: absolute;
        bottom: 0;
        left: 0;
        height: 3px;
        width: 0%;
        animation: expandWidth 5s linear forwards;
        opacity: 0.6;
    }

    toast-notification[data-realtime]::after {
        content: "";
        position: absolute;
        bottom: 0;
        left: 0;
        height: 3px;
        width: 0%;
        animation: expandWidth 10s linear forwards;
        opacity: 0.6;
    }

    toast-notification[data-visible="false"] {
        animation: hide 0.5s forwards;
    }

    toast-notification[data-visible="true"] {
        animation: show 0.5s forwards;
    }

    /* Danger / Error Status */
    toast-notification[data-status="danger"] {
        background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
        border-left-color: #991b1b;
        color: #ffffff;
    }

        toast-notification[data-status="danger"]::before {
            background: linear-gradient(135deg, rgba(220, 38, 38, 0.2), rgba(185, 28, 28, 0.3));
        }

        toast-notification[data-status="danger"]::after {
            background: linear-gradient(90deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.4));
        }

    /* Success Status */
    toast-notification[data-status="success"] {
        background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
        border-left-color: #166534;
        color: #ffffff;
    }

        toast-notification[data-status="success"]::before {
            background: linear-gradient(135deg, rgba(22, 163, 74, 0.2), rgba(21, 128, 61, 0.3));
        }

        toast-notification[data-status="success"]::after {
            background: linear-gradient(90deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.4));
        }

    /* Loading Status */
    toast-notification[data-status="loading"] {
        background: linear-gradient(135deg, #186FB5 0%, #1a5a8f 100%);
        border-left-color: #144a75;
        color: #ffffff;
    }

        toast-notification[data-status="loading"]::before {
            background: linear-gradient(135deg, rgba(24, 111, 181, 0.2), rgba(26, 90, 143, 0.3));
        }

        toast-notification[data-status="loading"]::after {
            background: linear-gradient(90deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.4));
        }

    /* Information Status */
    toast-notification[data-status="information"] {
        background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
        border-left-color: #0369a1;
        color: #ffffff;
    }

        toast-notification[data-status="information"]::before {
            background: linear-gradient(135deg, rgba(14, 165, 233, 0.2), rgba(2, 132, 199, 0.3));
        }

        toast-notification[data-status="information"]::after {
            background: linear-gradient(90deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.4));
        }

    /* Warning Status */
    toast-notification[data-status="warning"] {
        background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
        border-left-color: #b45309;
        color: #ffffff;
    }

        toast-notification[data-status="warning"]::before {
            background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(217, 119, 6, 0.3));
        }

        toast-notification[data-status="warning"]::after {
            background: linear-gradient(90deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.4));
        }


    toast-notification notification-icon {
        font-size: 2rem;
        display: flex;
        justify-content: center;
        align-items: center;
        width: 40px;
        height: 40px;
        background: rgba(255, 255, 255, 0.2);
        border-radius: 0.5rem;
        flex-shrink: 0;
        color: #ffffff;
    }

    toast-notification notification-text {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
        flex: 1;
        min-width: 0;
    }

        toast-notification notification-text notification-title {
            font-weight: 600;
            font-size: 1rem;
            color: #ffffff;
            line-height: 1.3;
        }

        toast-notification notification-text notification-description {
            font-size: 0.875rem;
            color: rgba(255, 255, 255, 0.9);
            line-height: 1.4;
        }

    toast-notification notification-close {
        cursor: pointer;
        font-size: 1.25rem;
        color: #ffffff;
        opacity: 0.8;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 0.375rem;
        width: 32px;
        height: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        transition: all 0.2s ease;
    }

        toast-notification notification-close:hover {
            opacity: 1;
            background: rgba(255, 255, 255, 0.2);
            transform: scale(1.1);
        }

/* Dark mode adjustments */
[data-theme="dark"] toast-notification {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] toast-notification notification-icon {
    background: rgba(255, 255, 255, 0.15);
}

[data-theme="dark"] toast-notification notification-close {
    background: rgba(255, 255, 255, 0.15);
}

    [data-theme="dark"] toast-notification notification-close:hover {
        background: rgba(255, 255, 255, 0.25);
    }

/* High Contrast mode adjustments */
[data-theme="high-contrast"] toast-notification {
    background-color: #000000 !important;
    border: 5px solid #ffffff !important;
    box-shadow: none;
}

[data-theme="high-contrast"] toast-notification::before {
    display: none;
}

[data-theme="high-contrast"] toast-notification[data-status="danger"] {
    background: #000000 !important;
    border-color: #ff0000 !important;
}

[data-theme="high-contrast"] toast-notification[data-status="success"] {
    background: #000000 !important;
    border-color: #00ff00 !important;
}

[data-theme="high-contrast"] toast-notification[data-status="loading"],
[data-theme="high-contrast"] toast-notification[data-status="information"] {
    background: #000000 !important;
    border-color: #0066ff !important;
}

[data-theme="high-contrast"] toast-notification[data-status="warning"] {
    background: #000000 !important;
    border-color: #ffff00 !important;
}

[data-theme="high-contrast"] toast-notification notification-icon {
    background: #ffffff;
    color: #000000;
    border: 2px solid #ffffff;
}

[data-theme="high-contrast"] toast-notification notification-text notification-title,
[data-theme="high-contrast"] toast-notification notification-text notification-description {
    color: #ffffff;
    font-weight: 700;
}

[data-theme="high-contrast"] toast-notification notification-close {
    background: #ffffff;
    color: #000000;
    border: 2px solid #ffffff;
}

    [data-theme="high-contrast"] toast-notification notification-close:hover {
        background: #cccccc;
    }

[data-theme="high-contrast"] toast-notification::after {
    background: #ffffff !important;
    height: 5px;
}

/* Responsive adjustments */
@media (max-width: 640px) {
    toast-notification {
        min-width: auto;
        max-width: calc(100vw - 2rem);
        margin: 0.5rem;
        padding: 0.875rem 1rem;
    }

    toast-notification notification-icon {
        width: 36px;
        height: 36px;
        font-size: 1.5rem;
    }

    toast-notification notification-text notification-title {
        font-size: 0.9375rem;
    }

    toast-notification notification-text notification-description {
        font-size: 0.8125rem;
    }
}

/* Animations */
@keyframes expandWidth {
    from {
        width: 0%;
    }

    to {
        width: 100%;
    }
}

@keyframes hide {
    from {
        bottom: 0;
        opacity: 1;
        transform: translateY(0);
    }

    to {
        bottom: -40rem;
        opacity: 0;
        transform: translateY(20px);
    }
}

@keyframes show {
    from {
        bottom: -40rem;
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        bottom: 0;
        opacity: 1;
        transform: translateY(0);
    }
}
