/**
 * Site notifications — aligned with html/thongbao.html (toast under header).
 * Scoped under .toast-container to avoid clashes with other UI.
 */
.toast-container {
    --toast-info: #3b82f6;
    --toast-success: #10b981;
    --toast-warning: #f59e0b;
    --toast-danger: #ef4444;
    --text-white: #ffffff;
    --text-muted: #94a3b8;
    --border-glass: rgba(255, 255, 255, 0.1);

    position: fixed;
    top: 90px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    overflow-x: hidden;
    padding-bottom: 4px;
    scrollbar-width: thin;
}

.toast-container::-webkit-scrollbar {
    width: 6px;
}

.toast-container::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.35);
    border-radius: 3px;
}

.toast-container .toast {
    pointer-events: auto;
    width: 380px;
    max-width: calc(100vw - 40px);
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    transform: translateX(120%);
    opacity: 0;
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.5s ease;
}

.toast-container .toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast-container .toast.hide {
    transform: translateX(120%);
    opacity: 0;
}

.toast-container .toast.toast--has-link {
    cursor: pointer;
}

.toast-container .toast.toast--has-link:focus-visible {
    outline: 2px solid var(--toast-color);
    outline-offset: 2px;
}

.toast-container .toast::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--toast-color);
    box-shadow: 2px 0 10px var(--toast-color);
}

.toast-container .toast.info {
    --toast-color: var(--toast-info);
}

.toast-container .toast.success {
    --toast-color: var(--toast-success);
}

.toast-container .toast.warning {
    --toast-color: var(--toast-warning);
}

.toast-container .toast.danger {
    --toast-color: var(--toast-danger);
}

.toast-container .toast-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-top: 2px;
    min-width: 0;
}

.toast-container .toast-title {
    color: var(--text-white);
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.2;
}

.toast-container .toast-message {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.5;
}

.toast-container .toast-close {
    flex-shrink: 0;
    color: var(--text-muted);
    padding: 4px;
    border-radius: 6px;
    transition: all 0.2s;
    margin-top: -2px;
    margin-right: -4px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.toast-container .toast-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-white);
}

.toast-container .toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: var(--toast-color);
    width: 100%;
    transform-origin: left;
}

@keyframes gd-site-toast-progress {
    100% {
        transform: scaleX(0);
    }
}

@media (max-width: 480px) {
    .toast-container {
        right: 12px;
        left: 12px;
        top: 82px;
    }

    .toast-container .toast {
        width: auto;
        max-width: none;
    }
}
