/**
 * Toast 全局提示样式
 */

.qm-toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.qm-toast {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 280px;
    max-width: 400px;
    padding: 14px 16px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08);
    transform: translateX(120%);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: auto;
}

.qm-toast--show {
    transform: translateX(0);
    opacity: 1;
}

.qm-toast__icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.qm-toast__content {
    flex: 1;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    word-break: break-word;
}

.qm-toast__close {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
}

.qm-toast__close:hover {
    background: #f3f4f6;
    color: #666;
}


.qm-toast--success .qm-toast__icon {
    color: #10b981;
}

.qm-toast--success {
    border-left: 4px solid #10b981;
}

.qm-toast--error .qm-toast__icon {
    color: #ef4444;
}

.qm-toast--error {
    border-left: 4px solid #ef4444;
}

.qm-toast--warning .qm-toast__icon {
    color: #f59e0b;
}

.qm-toast--warning {
    border-left: 4px solid #f59e0b;
}

.qm-toast--info .qm-toast__icon {
    color: #2563eb;
}

.qm-toast--info {
    border-left: 4px solid #7c3aed;
}


@media (max-width: 640px) {
    .qm-toast-container {
        top: auto;
        bottom: 20px;
        right: 10px;
        left: 10px;
    }
    
    .qm-toast {
        min-width: auto;
        max-width: none;
        transform: translateY(120%);
    }
    
    .qm-toast--show {
        transform: translateY(0);
    }
}

/* Mac 风格私信提醒 */
.qm-message-alerts {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 100001;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.qm-message-alert {
    position: relative;
    width: min(360px, calc(100vw - 32px));
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 14px 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.72);
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.18), 0 6px 20px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(18px) saturate(1.2);
    -webkit-backdrop-filter: blur(18px) saturate(1.2);
    transform: translate3d(120%, 0, 0);
    opacity: 0;
    transition: transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.24s ease;
    pointer-events: auto;
    cursor: pointer;
    overflow: hidden;
}

.qm-message-alert::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    background: var(--qm-primary-gradient-135, linear-gradient(135deg, #FF1493 0%, #FF69B4 100%));
    opacity: 0.9;
}

.qm-message-alert--show {
    transform: translate3d(0, 0, 0);
    opacity: 1;
}

.dark .qm-message-alert {
    background: rgba(15, 23, 42, 0.84);
    border-color: rgba(148, 163, 184, 0.16);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.42);
}

.qm-message-alert__avatar {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(255, 20, 147, 0.12), rgba(255, 105, 180, 0.12));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--qm-primary, #FF1493);
    flex-shrink: 0;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.qm-message-alert__avatar img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.qm-message-alert__avatar i {
    font-size: 18px;
}

.qm-message-alert__body {
    flex: 1;
    min-width: 0;
}

.qm-message-alert__eyebrow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 4px;
}

.qm-message-alert__app {
    font-size: 11px;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--qm-primary, #FF1493);
}

.qm-message-alert__time {
    font-size: 11px;
    line-height: 1.2;
    color: #94a3b8;
    flex-shrink: 0;
}

.qm-message-alert__title {
    font-size: 14px;
    line-height: 1.35;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dark .qm-message-alert__title {
    color: #f8fafc;
}

.qm-message-alert__text {
    font-size: 13px;
    line-height: 1.45;
    color: #475569;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.dark .qm-message-alert__text {
    color: #cbd5e1;
}

.qm-message-alert__hint {
    margin-top: 6px;
    font-size: 11px;
    line-height: 1.2;
    color: #94a3b8;
}

.qm-message-alert__close {
    width: 24px;
    height: 24px;
    border: 0;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.12);
    color: #64748b;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.qm-message-alert__close:hover {
    background: rgba(148, 163, 184, 0.2);
    color: #0f172a;
    transform: scale(1.04);
}

.dark .qm-message-alert__close {
    background: rgba(148, 163, 184, 0.14);
    color: #cbd5e1;
}

.dark .qm-message-alert__close:hover {
    color: #ffffff;
}

@media (max-width: 640px) {
    .qm-message-alerts {
        top: 12px;
        right: 10px;
        left: 10px;
    }

    .qm-message-alert {
        width: auto;
        transform: translate3d(0, -16px, 0);
    }

    .qm-message-alert--show {
        transform: translate3d(0, 0, 0);
    }
}
