/**
 * 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: #7c3aed;
}

.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);
    }
}
