/* Toast.css - 优雅的提示组件样式 */

.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    min-width: 280px;
    max-width: 400px;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: auto;
    border-left: 4px solid;
}

.toast-show {
    opacity: 1;
    transform: translateX(0);
}

.toast-hide {
    opacity: 0;
    transform: translateX(400px);
}

/* Toast图标 */
.toast-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: bold;
    flex-shrink: 0;
}

/* Toast消息 */
.toast-message {
    flex: 1;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
}

/* Toast类型样式 */
.toast-success {
    border-left-color: #52c41a;
}

.toast-success .toast-icon {
    background: #f6ffed;
    color: #52c41a;
}

.toast-error {
    border-left-color: #ff4d4f;
}

.toast-error .toast-icon {
    background: #fff1f0;
    color: #ff4d4f;
}

.toast-warning {
    border-left-color: #faad14;
}

.toast-warning .toast-icon {
    background: #fffbe6;
    color: #faad14;
}

.toast-info {
    border-left-color: #1890ff;
}

.toast-info .toast-icon {
    background: #e6f7ff;
    color: #1890ff;
}

/* Loading Toast */
.toast-loading {
    border-left-color: #1890ff;
}

.toast-spinner {
    width: 20px;
    height: 20px;
    border: 3px solid #e6f7ff;
    border-top-color: #1890ff;
    border-radius: 50%;
    animation: toast-spin 0.8s linear infinite;
}

@keyframes toast-spin {
    to { transform: rotate(360deg); }
}

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

    .toast {
        min-width: auto;
        max-width: none;
    }
}

/* 暗色主题支持 */
@media (prefers-color-scheme: dark) {
    .toast {
        background: #1f1f1f;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    }

    .toast-message {
        color: #e0e0e0;
    }
}
