/**
 * 全局提示组件样式
 * 支持 success、warning、error 三种类型
 */

/* 提示容器 */
.toast-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

/* 提示项 */
.toast {
    min-width: 300px;
    max-width: 500px;
    padding: 14px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: 'Alibaba PuHuiTi', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 14px;
    pointer-events: auto;
    animation: slideDown 0.3s ease-out;
    transition: all 0.3s ease;
}

/* 滑入动画 */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 滑出动画 */
@keyframes slideUp {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

.toast.hiding {
    animation: slideUp 0.3s ease-out forwards;
}

/* 图标容器 */
.toast-icon {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast-icon svg {
    width: 100%;
    height: 100%;
}

/* 消息文本 */
.toast-message {
    flex: 1;
    line-height: 1.5;
    word-break: break-word;
}

/* 关闭按钮 */
.toast-close {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s ease;
    background: none;
    border: none;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast-close:hover {
    opacity: 1;
}

.toast-close svg {
    width: 100%;
    height: 100%;
}

/* 成功提示 - Arco Success */
.toast-success {
    background: #E8FFEA;
    border: 1px solid #AFF0B5;
    color: #00B42A;
}

.toast-success .toast-icon svg {
    fill: #00B42A;
}

.toast-success .toast-close svg {
    stroke: #00B42A;
}

/* 警告提示 - Arco Warning */
.toast-warning {
    background: #FFF7E8;
    border: 1px solid #FFE4BA;
    color: #FF7D00;
}

.toast-warning .toast-icon svg {
    fill: #FF7D00;
}

.toast-warning .toast-close svg {
    stroke: #FF7D00;
}

/* 错误提示 - Arco Danger */
.toast-error {
    background: #FFECE8;
    border: 1px solid #FDCDC5;
    color: #F53F3F;
}

.toast-error .toast-icon svg {
    fill: #F53F3F;
}

.toast-error .toast-close svg {
    stroke: #F53F3F;
}

/* 响应式 */
@media (max-width: 768px) {
    .toast-container {
        top: 10px;
        left: 10px;
        right: 10px;
        transform: none;
    }
    
    .toast {
        min-width: auto;
        width: 100%;
    }
}
