/**
 * Toast 提示组件样式
 */

.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    pointer-events: none;
}

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

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

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

.toast-icon {
    font-size: 24px;
    flex-shrink: 0;
}

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

.toast-close {
    background: none;
    border: none;
    color: #999;
    font-size: 16px;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
    flex-shrink: 0;
}

.toast-close:hover {
    background: #f5f5f5;
    color: #666;
}

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

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

.toast-error {
    border-left: 4px solid #f5222d;
}

.toast-error .toast-icon {
    color: #f5222d;
}

.toast-warning {
    border-left: 4px solid #faad14;
}

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

.toast-info {
    border-left: 4px solid #1890ff;
}

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

.toast-loading .toast-icon {
    color: #1890ff;
}

/* 模态框遮罩 */
.toast-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: auto;
}

.toast-overlay.show {
    opacity: 1;
}

/* 模态框 */
.toast-modal {
    background: white;
    border-radius: 12px;
    padding: 30px;
    min-width: 400px;
    max-width: 90%;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    transform: scale(0.9);
    transition: transform 0.3s;
}

.toast-overlay.show .toast-modal {
    transform: scale(1);
}

.toast-modal-icon {
    text-align: center;
    font-size: 48px;
    color: #faad14;
    margin-bottom: 20px;
}

.toast-modal-message {
    font-size: 16px;
    color: #333;
    text-align: center;
    margin-bottom: 25px;
    line-height: 1.6;
}

.toast-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 20px;
    transition: all 0.3s;
}

.toast-input:focus {
    outline: none;
    border-color: #1890ff;
    box-shadow: 0 0 0 3px rgba(24, 144, 255, 0.1);
}

.toast-modal-buttons {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.toast-btn {
    padding: 10px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.toast-btn-cancel {
    background: #f5f5f5;
    color: #666;
}

.toast-btn-cancel:hover {
    background: #e8e8e8;
}

.toast-btn-confirm {
    background: #1890ff;
    color: white;
}

.toast-btn-confirm:hover {
    background: #40a9ff;
}

/* 响应式 */
@media (max-width: 768px) {
    .toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
    }
    
    .toast {
        min-width: auto;
        width: 100%;
        transform: translateY(-100px);
    }
    
    .toast.show {
        transform: translateY(0);
    }
    
    .toast.hide {
        transform: translateY(-100px);
    }
    
    .toast-modal {
        min-width: 90%;
        padding: 20px;
    }
    
    .toast-modal-icon {
        font-size: 36px;
    }
    
    .toast-modal-buttons {
        flex-direction: column-reverse;
    }
    
    .toast-btn {
        width: 100%;
    }
}

/* 暗色主题支持 */
@media (prefers-color-scheme: dark) {
    .toast {
        background: #2d2d2d;
    }
    
    .toast-message {
        color: #e8e8e8;
    }
    
    .toast-close {
        color: #999;
    }
    
    .toast-close:hover {
        background: #404040;
        color: #ccc;
    }
    
    .toast-modal {
        background: #2d2d2d;
    }
    
    .toast-modal-message {
        color: #e8e8e8;
    }
    
    .toast-input {
        background: #404040;
        border-color: #555;
        color: #e8e8e8;
    }
    
    .toast-btn-cancel {
        background: #404040;
        color: #ccc;
    }
    
    .toast-btn-cancel:hover {
        background: #4d4d4d;
    }
}

