/* Toast Notification Styles */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 99999;
    pointer-events: none;
    display: flex;
    flex-direction: column-reverse;
    gap: 10px;
}

.toast {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 14px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 320px;
    max-width: 420px;
    pointer-events: auto;
    transform: translateY(20px) scale(0.95);
    opacity: 0;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid rgba(0, 0, 0, 0.04);
    overflow: hidden;
    position: relative;
}

.toast::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    border-radius: 14px 0 0 14px;
}

.toast.show {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.toast.hide {
    transform: translateX(120%) scale(0.9);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.55, 0, 1, 0.45);
}

.toast-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    border-radius: 10px;
}

.toast-content {
    flex: 1;
    min-width: 0;
}

.toast-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 2px;
    color: #1a1a2e;
    line-height: 1.3;
}

.toast-message {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.toast-close {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border: none;
    background: rgba(0, 0, 0, 0.04);
    cursor: pointer;
    color: #9ca3af;
    font-size: 16px;
    line-height: 1;
    padding: 0;
    transition: all 0.2s;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast-close:hover {
    background: rgba(0, 0, 0, 0.08);
    color: #374151;
}

/* Progress bar */
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    border-radius: 0 0 14px 14px;
    transition: width linear;
}

/* Toast Types */
.toast.success::before { background: #10b981; }
.toast.success .toast-icon { background: rgba(16, 185, 129, 0.1); color: #10b981; }
.toast.success .toast-progress { background: #10b981; }

.toast.error::before { background: #ef4444; }
.toast.error .toast-icon { background: rgba(239, 68, 68, 0.1); color: #ef4444; }
.toast.error .toast-progress { background: #ef4444; }

.toast.info::before { background: #f97f34; }
.toast.info .toast-icon { background: rgba(249, 127, 52, 0.1); color: #f97f34; }
.toast.info .toast-progress { background: #f97f34; }

.toast.warning::before { background: #f59e0b; }
.toast.warning .toast-icon { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }
.toast.warning .toast-progress { background: #f59e0b; }

/* Mobile Responsive */
@media (max-width: 768px) {
    .toast-container {
        bottom: 16px;
        right: 12px;
        left: 12px;
    }

    .toast {
        min-width: auto;
        max-width: 100%;
    }
}

/* Spinner Animation for Loading */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* ===== Notification Dropdown Overflow Fix ===== */
.mn-tool-notify {
    position: relative;
}

.mn-notify-dropdown {
    right: 0 !important;
    transform: none !important;
    max-width: calc(100vw - 20px) !important;
}

/* Ensure notification item text never overflows */
.mn-notify-item-title,
.mn-notify-item-message {
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
}

.mn-notify-item-message {
    display: -webkit-box !important;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* On screens where bell is near right edge, push dropdown left */
@media (min-width: 992px) {
    .mn-notify-dropdown {
        right: -20px !important;
        left: auto !important;
    }
}

@media (max-width: 991px) {
    .mn-notify-dropdown {
        right: 0 !important;
        left: auto !important;
        width: min(360px, calc(100vw - 20px)) !important;
    }
}